Function at 0x404220
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
xor eax, eax
push ebx
push esi
push edi
cmp dword [0x40d2ac], eax
je 0x404294
mov dword [0x40d2ac], eax
cmp dword [0x410be0], eax
jne 0x40424c
mov dword [0x410be0], 1
cmp dword [0x410bd4], eax
jne 0x404260
push eax
call fcn.0040c9f9
pop ecx
mov dword [0x410bd4], eax
cmp dword [0x410bdc], 0
jne 0x404276
push 1
call fcn.0040c9f9
pop ecx
mov dword [0x410bdc], eax
mov ebx, dword [0x410be4]
test ebx, ebx
jne 0x40428d
call fcn.00404d69
mov ebx, eax
mov dword [0x410be4], ebx
call fcn.00404d37
jmp 0x40429a
mov ebx, dword [0x410be4]
mov cl, byte [0x410c54]
mov eax, dword [0x410bd8]
mov esi, eax
mov dword [ebp - 8], esi
mov byte [eax], cl
mov edx, dword [ebx + 0x1c]
add edx, dword [0x410be0]
xor edi, edi
movzx eax, byte [esi]
mov al, byte [eax*4 + 0x401340]
mov byte [ebp - 1], al
cmp word [edx*2 + 0x401c70], di
je 0x4042da
mov dword [0x410c48], edx
mov dword [0x410c4c], esi
mov bl, byte [ebp - 1]
movzx eax, al
movsx ecx, word [edx*2 + 0x402308]
add ecx, eax
movsx eax, word [ecx*2 + 0x401dd8]
cmp eax, edx
je 0x404315
movsx edx, word [edx*2 + 0x402528]
cmp edx, 0xb2
jl 0x404310
movzx eax, bl
mov bl, byte [eax*4 + 0x4024b0]
movzx eax, bl
jmp 0x4042e0
movsx ecx, word [edx*2 + 0x402308]
movzx eax, bl
add ecx, eax
mov eax, 0x27a
inc esi
movsx edx, word [ecx*2 + 0x401740]
cmp word [edx*2 + 0x402308], ax
jne 0x4042b7
mov edi, dword [ebp - 8]
mov ebx, dword [0x410be4]
movsx eax, word [edx*2 + 0x401c70]
mov dword [ebp - 8], eax
test eax, eax
jne 0x40436c
mov eax, dword [0x410c48]
mov esi, dword [0x410c4c]
movsx eax, word [eax*2 + 0x401c70]
mov dword [ebp - 8], eax
mov cl, byte [esi]
mov eax, esi
sub eax, edi
mov byte [0x410c54], cl
mov dword [0x4118d8], eax
mov edx, edi
xor eax, eax
mov dword [0x4118dc], edx
mov byte [esi], al
mov eax, dword [ebp - 8]
mov dword [0x410bd8], esi
cmp eax, 0x19
ja case.default.0x40439b
jmp dword [eax*4 + 0x404920]
mov eax, esi
mov byte [esi], cl
sub eax, edx
dec eax
mov dword [ebp - 0xc], eax
xor eax, eax
cmp dword [ebx + 0x24], eax
jne 0x4043c9
mov eax, dword [ebx + 0x10]
mov dword [0x410c50], eax
mov eax, dword [0x410bd4]
mov dword [ebx], eax
mov dword [ebx + 0x24], 1
mov eax, dword [ebx + 4]
add eax, dword [0x410c50]
cmp dword [0x410bd8], eax
jbe 0x40446a
call fcn.0040498e
xor ecx, ecx
sub eax, ecx
je 0x404499
sub eax, 1
jne 0x40443a
mov eax, dword [0x4118dc]
mov ebx, dword [0x410be4]
mov dword [0x410bd8], eax
mov eax, dword [0x410be0]
dec eax
mov dword [0x410c58], ecx
mov cl, byte [0x410c54]
cdq
sub eax, edx
mov edx, dword [0x4118dc]
sar eax, 1
add eax, 0x19
jmp 0x404392
mov edx, dword [0x410c48]
mov byte [esi], cl
mov esi, dword [0x410c4c]
jmp 0x404347
sub eax, 1
jne 0x404294
mov ebx, dword [0x410be4]
mov esi, dword [ebx + 4]
add esi, dword [0x410c50]
mov dword [0x410bd8], esi
call fcn.00404bc7
mov edi, dword [0x4118dc]
mov edx, eax
jmp 0x404347
mov esi, dword [ebp - 0xc]
add esi, edx
mov dword [0x410bd8], esi
call fcn.00404bc7
mov ecx, eax
mov dword [ebp - 0xc], eax
call fcn.00404c72
mov edi, dword [0x4118dc]
mov dword [ebp - 8], edi
test eax, eax
jne 0x4044b9
mov edx, dword [ebp - 0xc]
jmp 0x404347
mov edi, dword [0x4118dc]
mov esi, dword [ebp - 0xc]
add esi, edi
mov dword [ebp - 8], edi
mov dword [0x410bd8], esi
call fcn.00404bc7
mov edx, eax
jmp 0x4042b5
inc esi
jmp 0x4044b2
mov esi, dword [0x4118d8]
test esi, esi
jle 0x4042a0
xor eax, eax
cmp byte [esi + edx - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
jmp 0x4042a0
mov ecx, dword [0x4118d8]
test ecx, ecx
jle 0x4044f3
xor eax, eax
cmp byte [ecx + edx - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
push dword [0x410bdc]
push 1
push ecx
push edx
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
jmp 0x404294
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x40453f
xor edx, edx
cmp byte [esi - 1], 0xa
sete dl
mov dword [ebx + 0x1c], edx
xor edx, edx
mov ecx, edi
call fcn.00409605
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404582
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
inc edx
jmp 0x404541
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle case.0x40439b.25
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor eax, eax
jmp 0x40454b
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x4045ef
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
mov ecx, str.A.ROOT_SERVERS.NET.
inc edx
jmp 0x404543
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x410bd8], esi
sub ecx, edi
mov dword [0x4118dc], edi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x40462e
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
push 0x25
push 2
call fcn.0040baef
pop ecx
pop ecx
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404670
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
call fcn.00408f64
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x4046ac
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
inc edx
call fcn.00407c96
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x4046eb
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
jmp 0x4046af
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404721
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
inc edx
call fcn.00407b76
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404760
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
jmp 0x404724
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404796
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
mov ecx, edi
call fcn.00409c1f
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x410bd8], esi
sub ecx, edi
mov dword [0x4118dc], edi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x4047d4
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
push 0xcf
push 1
jmp 0x404632
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404812
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
inc edx
mov ecx, edi
call fcn.00409932
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404853
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
jmp 0x404815
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x404889
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
inc edx
call fcn.00409a6f
jmp 0x404548
mov byte [esi], cl
dec esi
mov ecx, esi
mov dword [0x4118dc], edi
sub ecx, edi
mov dword [0x410bd8], esi
mov dword [0x4118d8], ecx
mov al, byte [esi]
mov byte [0x410c54], al
xor eax, eax
mov byte [esi], al
test ecx, ecx
jle 0x4048c8
cmp byte [esi - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
xor edx, edx
jmp 0x40488c
mov ecx, dword [0x4118d8]
test ecx, ecx
jle 0x404548
xor eax, eax
cmp byte [ecx + edx - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
jmp 0x404548
mov ecx, dword [0x4118d8]
test ecx, ecx
jle 0x404903
xor eax, eax
cmp byte [ecx + edx - 1], 0xa
sete al
mov dword [ebx + 0x1c], eax
push edx
push 0x401224
call dword [sym.imp.msvcrt.dll_printf]
jmp 0x404637
mov ecx, 0x401240
call fcn.00404e0e
mov edi, edi
daa
inc esp
inc eax
add byte [ebx], cl
inc ebp
inc eax
add byte [eax + 0x45], dl
inc eax
add byte [edi - 0x78ffbfbb], al
inc ebp
inc eax
add byte [ebp - 0x3ffbfbb], bh
inc ebp
inc eax
add ah, bh
inc ebp
inc eax
add byte [esi], bh
inc esi
inc eax
add byte [edx + 0x46], bh
inc eax
add byte [ecx - 0x10ffbfba], bh
inc esi
inc eax
add byte [esi], ch
inc edi
inc eax
add byte [edi + eax*2 + 0x40], ah
add byte [edx - 0x5dffbfb9], ah
inc edi
inc eax
add al, ah
inc edi
inc eax
add byte [ecx], ah
dec eax
inc eax
add byte [edi + 0x48], dl
inc eax
add byte [esi - 0x33ffbfb8], dl
dec eax
inc eax
add ah, ch
dec eax
inc eax
add byte [esp + eax*2 + 0x44dc0040], bh
inc eax
add byte [edx - 0x46ffbfbd], ah
inc ebp
inc eax
add ah, cl
int3