Function at 0x404c39
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xc0
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x14], eax
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
call sub.msvcrt.dll__errno
mov eax, dword [eax]
mov dword [esp + 0x7c], eax
mov eax, 0x6000
and eax, dword [ebp + 8]
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x34], 0xfffffffd
mov word [esp + 0x38], 0
mov dword [esp + 0x3c], 0
mov word [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], 0xffffffff
mov dword [esp + 0x74], eax
add eax, 0x200
mov dword [esp + 0x78], eax
jmp 0x4047d3
movsx eax, al
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.msvcrt.dll_fputc
inc dword [esp + 0x44]
inc esi
movzx eax, byte [esi - 1]
test eax, eax
je 0x405282
cmp eax, 0x25
je 0x404814
mov edx, dword [esp + 0x28]
test edx, 0x4000
jne 0x4047fb
mov ecx, dword [esp + 0x48]
cmp ecx, dword [esp + 0x44]
jle 0x40480e
mov ecx, dword [esp + 0x24]
test edx, 0x2000
jne 0x4047c0
mov edx, dword [esp + 0x44]
mov byte [ecx + edx], al
inc dword [esp + 0x44]
jmp 0x4047d3
mov eax, dword [esp + 0x74]
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 0xffffffff
mov dword [esp + 0x2c], 0xffffffff
movzx ebx, byte [esi]
test bl, bl
je 0x404ae0
mov dword [esp + 0x1c], 0
lea eax, [esp + 0x2c]
mov dword [esp + 0x20], eax
mov edi, esi
xor edx, edx
nop dword [eax + eax]
lea eax, [edi + 1]
mov dword [esp + 0x10], eax
movsx ecx, bl
movzx ebx, bl
add ebx, 0xffffffe0
cmp ebx, 0x5a
ja case.0x40486e.33
mov eax, 4
jmp dword [ebx*4 + 0x40b464]
mov dword [esp + 0x1c], 0
jmp 0x404a90
lea ecx, [edi + 2]
xor ebx, ebx
cmp byte [edi + 1], 0x6c
sete bl
mov edx, dword [esp + 0x10]
cmove edx, ecx
mov ecx, edx
or ebx, 2
mov dword [esp + 0x1c], ebx
jmp 0x404a94
test edx, edx
jne 0x404954
or byte [esp + 0x29], 0x10
mov dword [esp + 0x60], 0
call sub.msvcrt.dll_localeconv
mov eax, dword [eax + 4]
lea ecx, [esp + 0x60]
mov dword [esp + 0xc], ecx
mov dword [esp + 4], eax
lea eax, [esp + 0x18]
mov dword [esp], eax
mov dword [esp + 8], 0x10
call fcn.00406e70
test eax, eax
jle 0x4048ee
movzx ecx, word [esp + 0x18]
mov word [esp + 0x40], cx
mov dword [esp + 0x3c], eax
xor eax, eax
jmp 0x404a90
test edx, edx
jne 0x404954
or byte [esp + 0x29], 1
xor eax, eax
jmp 0x404a90
test edx, edx
jne 0x404954
or byte [esp + 0x29], 4
xor eax, eax
jmp 0x404a90
cmp edx, 1
ja 0x404a90
mov dword [esp + 0x30], 0
mov eax, 2
lea ecx, [esp + 0x30]
mov dword [esp + 0x20], ecx
jmp 0x404a90
test edx, edx
jne 0x404954
or byte [esp + 0x28], 0x40
xor eax, eax
jmp 0x404a90
test edx, edx
je 0x404a6e
mov eax, edx
jmp 0x404a90
mov edi, dword [esp + 0x20]
test edi, edi
je 0x404a5d
test edx, 0xfffffffd
jne 0x404a5d
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
add ecx, 4
mov dword [edi], eax
test eax, eax
mov dword [esp + 0x14], ecx
jns 0x404996
test edx, edx
je 0x404acb
mov dword [esp + 0x30], 0xffffffff
mov eax, edx
mov dword [esp + 0x20], 0
jmp 0x404a90
mov dword [esp + 0x1c], 3
jmp 0x404a90
mov ecx, dword [esp + 0x10]
movzx ebx, byte [ecx]
cmp ebx, 0x33
je 0x404aa5
cmp ebx, 0x36
jne 0x404ac1
lea eax, [edi + 3]
xor ecx, ecx
cmp byte [edi + 2], 0x34
sete cl
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x10]
cmove ecx, eax
mov eax, 4
jmp 0x404a94
lea ecx, [edi + 2]
xor edx, edx
cmp byte [edi + 1], 0x68
sete dl
lea edx, [edx*4 + 1]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x10]
cmove edx, ecx
mov ecx, edx
jmp 0x404a94
test edx, edx
je 0x404a77
cmp edx, 3
ja 0x404b52
mov eax, ecx
add al, 0xd0
cmp al, 9
ja 0x404b52
cmp edx, 2
mov eax, edx
mov edi, 3
cmove eax, edi
test edx, edx
mov edx, 1
cmove eax, edx
mov edi, dword [esp + 0x20]
test edi, edi
je 0x404a5d
mov edx, dword [edi]
test edx, edx
js 0x404a80
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*2]
add ecx, 0xffffffd0
jmp 0x404a83
mov dword [esp + 0x20], 0
jmp 0x404a90
or byte [esp + 0x28], 4
jmp 0x404a90
or byte [esp + 0x29], 8
xor eax, eax
jmp 0x404a90
or byte [esp + 0x29], 2
xor eax, eax
jmp 0x404a90
add ecx, 0xffffffd0
mov dword [edi], ecx
nop word cs:[eax + eax]
mov ecx, dword [esp + 0x10]
movzx ebx, byte [ecx]
mov edi, ecx
mov edx, eax
test bl, bl
jne 0x404850
jmp 0x404ae2
lea eax, [edi + 3]
xor edx, edx
cmp byte [edi + 2], 0x32
sete dl
cmove ecx, eax
add edx, edx
mov dword [esp + 0x1c], edx
mov eax, 4
jmp 0x404a94
mov dword [esp + 0x1c], 0
jmp 0x404a97
or byte [esp + 0x29], 4
neg dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 0x20], 0
jmp 0x404a90
mov ecx, esi
mov esi, ecx
jmp 0x4047d3
and byte [esp + 0x29], 0xfe
mov esi, dword [esp + 0x1c]
cmp esi, 2
je 0x404b87
cmp esi, 3
mov edx, dword [esp + 0x14]
jne 0x404b95
movsd xmm0, qword [edx]
add edx, 8
movsd qword [esp + 0x50], xmm0
jmp 0x405096
or byte [esp + 0x28], 0x80
mov esi, dword [esp + 0x1c]
cmp esi, 2
je 0x404efa
cmp esi, 3
mov edx, dword [esp + 0x14]
jne 0x404f0c
mov ecx, dword [edx]
mov eax, dword [edx + 4]
add edx, 8
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x14], edx
jmp 0x40515b
mov eax, dword [esp + 0x28]
test eax, 0x4000
jne 0x404b67
mov ecx, dword [esp + 0x48]
cmp ecx, dword [esp + 0x44]
jle 0x404b7e
mov ecx, dword [esp + 0x24]
test eax, 0x2000
jne 0x404f3c
mov eax, dword [esp + 0x44]
mov byte [ecx + eax], 0x25
inc dword [esp + 0x44]
jmp 0x4047d3
mov edx, dword [esp + 0x14]
mov eax, dword [edx]
add edx, 4
jmp 0x40508a
mov eax, dword [edx]
add edx, 4
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0
cmp esi, 5
je 0x405087
cmp esi, 1
jne 0x405096
movzx eax, ax
jmp 0x40508a
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call sub.msvcrt.dll_strerror
test eax, eax
mov esi, str._null_
cmovne esi, eax
mov eax, dword [esp + 0x30]
test eax, eax
js 0x4050be
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004070f0
jmp 0x4050c6
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x1c]
and eax, 0xfffffffe
cmp eax, 2
je 0x404e2a
mov esi, dword [esp + 0x14]
movzx eax, byte [esi]
mov byte [esp + 0x50], al
lea eax, [esp + 0x24]
mov dword [esp], eax
lea ecx, [esp + 0x50]
mov edx, 1
call fcn.00405410
jmp 0x404e4b
mov eax, dword [esp + 0x28]
jmp 0x404d12
test edx, edx
jne 0x404c57
mov eax, dword [esp + 0x74]
cmp dword [esp + 0x28], eax
jne 0x404c57
mov eax, dword [esp + 0x78]
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], 8
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
add ecx, 4
mov dword [esp + 0x14], ecx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
movups xmm0, xmmword [esp + 0x50]
movups xmmword [esp], xmm0
lea edx, [esp + 0x24]
mov ecx, pe_nt_image_headers32
jmp 0x4050b0
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x1c]
dec ecx
cmp ecx, 4
ja case.0x404ca5.2
jmp dword [ecx*4 + 0x40b5d0]
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [ecx], eax
jmp 0x4051a9
mov eax, dword [esp + 0x28]
jmp 0x404e97
mov eax, dword [esp + 0x28]
test eax, 0x4000
jne 0x404cdb
mov ecx, dword [esp + 0x48]
cmp ecx, dword [esp + 0x44]
jle 0x4050e6
mov ecx, dword [esp + 0x24]
test eax, 0x2000
jne 0x4050d6
mov eax, dword [esp + 0x44]
mov byte [ecx + eax], 0x25
jmp 0x4050e6
mov eax, dword [esp + 0x28]
or eax, 0x20
mov dword [esp + 0x28], eax
jmp 0x404e5f
mov eax, dword [esp + 0x28]
or eax, 0x20
mov dword [esp + 0x28], eax
test al, 4
mov eax, dword [esp + 0x14]
jne 0x404d21
fld qword [eax]
add eax, 8
jmp 0x404d26
fld xword [eax]
add eax, 0xc
mov dword [esp + 0x14], eax
fstp xword [esp]
lea ecx, [esp + 0x24]
call fcn.00405bf0
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov eax, dword [esp + 0x28]
jmp 0x404d50
mov eax, dword [esp + 0x28]
or eax, 0x20
mov dword [esp + 0x28], eax
test al, 4
mov ebx, dword [esp + 0x14]
jne 0x404db8
movsd xmm0, qword [ebx]
add ebx, 8
movsd qword [esp + 0xb0], xmm0
fld qword [esp + 0xb0]
fld st(0)
fstp xword [esp + 0x80]
fxam
wait
fnstsw ax
fstp st(0)
and eax, 0x4500
cmp eax, 0x100
mov dword [esp + 0x14], ebx
jne 0x404f72
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x28]
test eax, 0x100
jne 0x40503f
test al, 0x40
je 0x404e10
mov byte [esp + 0x18], 0x20
jmp 0x405044
fld xword [ebx]
add ebx, 0xc
fld st(0)
fstp xword [esp + 0x90]
mov ecx, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
fld st(0)
fstp xword [esp + 0x60]
fxam
wait
fnstsw ax
and eax, 0x4500
cmp eax, 0x100
mov dword [esp + 0x14], ebx
jne 0x404fe8
fstp st(0)
mov dword [esp + 0x30], 0xffffffff
mov eax, dword [esp + 0x28]
test eax, 0x100
jne 0x40503f
test al, 0x40
jne 0x404dae
lea edx, [esp + 0x18]
jmp 0x405048
mov eax, dword [esp + 0x30]
jmp 0x404ed8
mov dword [esp + 0x30], 0xffffffff
mov esi, dword [esp + 0x14]
movzx eax, word [esi]
mov word [esp + 0x60], ax
lea eax, [esp + 0x24]
mov dword [esp], eax
lea ecx, [esp + 0x60]
mov edx, 1
call fcn.00405290
add esi, 4
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov eax, dword [esp + 0x28]
test al, 4
mov eax, dword [esp + 0x14]
jne 0x404e6e
fld qword [eax]
add eax, 8
jmp 0x404e73
fld xword [eax]
add eax, 0xc
mov dword [esp + 0x14], eax
fstp xword [esp]
lea ecx, [esp + 0x24]
call fcn.00405d80
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov eax, dword [esp + 0x28]
or eax, 0x20
mov dword [esp + 0x28], eax
test al, 4
mov eax, dword [esp + 0x14]
jne 0x404ea6
fld qword [eax]
add eax, 8
jmp 0x404eab
fld xword [eax]
add eax, 0xc
mov dword [esp + 0x14], eax
fstp xword [esp]
lea ecx, [esp + 0x24]
call fcn.00405f70
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov ecx, dword [esp + 0x1c]
and ecx, 0xfffffffe
mov eax, dword [esp + 0x30]
cmp ecx, 2
jne 0x40505e
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
test ecx, ecx
mov esi, 0x40b5e4
cmovne esi, ecx
test eax, eax
js 0x404f55
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00407130
jmp 0x404f5d
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
add ecx, 4
mov dword [esp + 0x14], ecx
jmp 0x405150
mov ecx, dword [edx]
add edx, 4
mov eax, ecx
sar eax, 0x1f
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], eax
cmp esi, 5
mov dword [esp + 0x14], edx
je 0x40514d
cmp esi, 1
jne 0x40515b
movsx eax, cx
jmp 0x405150
mov dword [esp + 4], ecx
mov dword [esp], 0x25
call sub.msvcrt.dll_fputc
inc dword [esp + 0x44]
jmp 0x4047d3
mov dword [esp], esi
call sub.msvcrt.dll_wcslen
lea ecx, [esp + 0x24]
mov dword [esp], ecx
mov ecx, esi
mov edx, eax
call fcn.00405290
jmp 0x4051dc
mov edx, dword [esp + 0x80]
mov esi, dword [esp + 0x84]
movsx ecx, word [esp + 0x88]
mov edi, ecx
sar edi, 0x1f
jns 0x404f94
or byte [esp + 0x28], 0x80
movsd qword [esp + 0xa8], xmm0
fld qword [esp + 0xa8]
fxam
wait
fnstsw ax
fstp st(0)
and eax, 0x4500
cmp eax, 0x500
jne 0x4050f3
mov dword [esp + 0x30], 0xffffffff
test edi, edi
js 0x4051b9
mov eax, dword [esp + 0x28]
test eax, 0x100
jne 0x4051ec
test al, 0x40
je 0x405036
mov byte [esp + 0x18], 0x20
jmp 0x4051f1
movsx esi, word [esp + 0x98]
mov edi, esi
sar edi, 0x1f
jns 0x404ffc
or byte [esp + 0x28], 0x80
fxam
wait
fnstsw ax
fstp st(0)
and eax, 0x4500
cmp eax, 0x500
jne 0x405130
mov dword [esp + 0x30], 0xffffffff
test edi, edi
js 0x4051b9
mov eax, dword [esp + 0x28]
test eax, 0x100
jne 0x4051ec
test al, 0x40
jne 0x404fde
lea edx, [esp + 0x18]
jmp 0x4051f5
mov byte [esp + 0x18], 0x2b
lea edx, [esp + 0x19]
and al, 0x20
mov ecx, eax
or cl, 0x4e
mov byte [edx], cl
or al, 0x41
mov byte [edx + 1], al
mov byte [edx + 2], cl
jmp 0x40520b
mov edi, dword [esp + 0x14]
mov ecx, dword [edi]
test ecx, ecx
mov esi, str._null_
cmovne esi, ecx
test eax, eax
js 0x4051c4
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004070f0
jmp 0x4051cc
movzx eax, al
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0
mov dword [esp + 0x14], edx
cmp cl, 0x75
je 0x405166
movups xmm0, xmmword [esp + 0x50]
movups xmmword [esp], xmm0
lea edx, [esp + 0x24]
call fcn.004058b0
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov dword [esp], esi
call sub.msvcrt.dll_strlen
lea ecx, [esp + 0x24]
mov dword [esp], ecx
mov ecx, esi
mov edx, eax
jmp 0x40521b
mov dword [esp + 4], ecx
mov dword [esp], 0x25
call sub.msvcrt.dll_fputc
inc dword [esp + 0x44]
mov esi, dword [esp + 0x10]
jmp 0x4047d3
and ecx, 0x7fff
mov word [esp + 0x68], cx
mov eax, ecx
dec eax
movzx eax, ax
cmp eax, 0x3bff
ja 0x405229
movzx eax, cx
mov ecx, 0x3c01
sub ecx, eax
shrd edx, esi, cl
shr esi, cl
xor edi, edi
test cl, 0x20
cmovne edx, esi
cmovne esi, edi
add ecx, eax
jmp 0x40522e
and si, 0x7fff
mov word [esp + 0x68], si
je 0x40524a
movzx eax, si
add eax, 0xffffc001
jmp 0x405252
movsx eax, cl
mov dword [esp + 0x50], eax
sar eax, 0x1f
mov dword [esp + 0x54], eax
sar eax, 0x1f
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], eax
movups xmm0, xmmword [esp + 0x50]
movups xmmword [esp], xmm0
lea ecx, [esp + 0x24]
call fcn.00405530
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov ecx, eax
sar ecx, 0x1f
mov esi, dword [esp + 0x14]
mov edx, dword [esi]
mov dword [edx + 4], ecx
mov dword [edx], eax
jmp 0x404e4b
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov word [ecx], ax
jmp 0x4051a9
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov byte [ecx], al
add edx, 4
mov dword [esp + 0x14], edx
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov byte [esp + 0x18], 0x2d
mov eax, dword [esp + 0x28]
jmp 0x4051f1
mov dword [esp], esi
call sub.msvcrt.dll_strlen
lea ecx, [esp + 0x24]
mov dword [esp], ecx
mov ecx, esi
mov edx, eax
call fcn.00405410
add edi, 4
mov dword [esp + 0x14], edi
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov byte [esp + 0x18], 0x2b
lea edx, [esp + 0x19]
and al, 0x20
mov ecx, eax
or cl, 0x49
mov byte [edx], cl
mov ecx, eax
or cl, 0x4e
mov byte [edx + 1], cl
or al, 0x46
mov byte [edx + 2], al
lea ecx, [esp + 0x18]
sub edx, ecx
add edx, 3
lea eax, [esp + 0x24]
mov dword [esp], eax
call fcn.00405410
mov esi, dword [esp + 0x10]
jmp 0x4047d3
test cx, cx
je 0x405272
add ecx, 0xffffc004
mov word [esp + 0x68], cx
shrd edx, esi, 3
shr esi, 3
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], esi
jmp 0x405257
mov ax, 0xc002
or ecx, edx
je 0x405257
mov word [esp + 0x68], ax
movups xmm0, xmmword [esp + 0x60]
movups xmmword [esp], xmm0
lea ecx, [esp + 0x24]
call fcn.004068e0
mov esi, dword [esp + 0x10]
jmp 0x4047d3
mov cx, 0xfc05
mov eax, edx
or eax, esi
jne 0x405234
xor edx, edx
xor esi, esi
jmp 0x405240
mov eax, dword [esp + 0x44]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret