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

Disassembly:
sub esp, 0x298
push ebx
push ebp
mov ebp, dword [esp + 0x2a4]
mov al, byte [ebp + 0x54]
mov ebx, dword [ebp]
push esi
xor esi, esi
test al, 2
push edi
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], ebx
jne 0x404a90
call fcn.004163f0
pop edi
pop esi
pop ebp
mov dword [eax], 0x78
mov eax, 0x78
pop ebx
add esp, 0x298
ret
mov eax, dword [ebx + 0x170]
test ah, ah
jns 0x404ab5
call fcn.004163f0
pop edi
pop esi
pop ebp
mov dword [eax], 0xd
mov eax, 0xd
pop ebx
add esp, 0x298
ret
mov eax, dword [ebp + 4]
mov ecx, dword [eax + 0x1c]
cmp ecx, dword [ebx + 0xd4]
jb 0x404aeb
ja 0x404ad0
mov edx, dword [eax + 0x18]
cmp edx, dword [ebx + 0xd0]
jb 0x404aeb
call fcn.004163f0
pop edi
pop esi
pop ebp
mov dword [eax], 0x88
mov eax, 0x88
pop ebx
add esp, 0x298
ret
mov edi, dword [ebp + 0x70]
mov eax, dword [ebp + 0x74]
push 1
push 4
push ebp
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], eax
call fcn.004032d0
add esp, 0xc
test eax, eax
je 0x404b1c
call fcn.004163f0
mov eax, dword [eax]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x298
ret
mov eax, dword [ebx + 0x1d4]
cmp eax, esi
je 0x404b3e
mov ecx, dword [esp + 0x2b0]
push ecx
push ebp
call eax
add esp, 8
mov dword [ebp + 0x90], eax
mov dword [esp + 0x40], eax
mov edx, dword [esp + 0x2b0]
push edx
push ebp
call dword [ebx + 0x1d0]
add esp, 8
test eax, eax
je 0x404b64
call fcn.004163f0
mov eax, dword [eax]
mov dword [esp + 0x10], eax
jmp 0x404fc9
mov al, byte [ebx + 0x13]
test al, al
mov dword [esp + 0x14], esi
jbe 0x404bed
mov dword [esp + 0x1c], esi
mov esi, dword [ebx + 0x144]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x2b4]
add esi, ecx
mov ecx, dword [esp + 0x2b0]
push 1
push ecx
push edx
push esi
call fcn.0040dc50
add esp, 0x10
test eax, eax
je 0x404bce
mov eax, dword [ebp + 0x74]
mov ecx, dword [ebp + 0x70]
mov edx, dword [esp + 0x2b4]
push eax
push ecx
push edx
push esi
call fcn.0040db50
add esp, 8
push eax
mov eax, dword [esp + 0x2c0]
push eax
push esi
push ebp
call fcn.0040d9b0
add esp, 0x18
test al, al
jne 0x404c0a
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
xor ecx, ecx
mov cl, byte [ebx + 0x13]
inc eax
add esi, 0xc
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], esi
cmp eax, ecx
jb 0x404b73
xor esi, esi
push ebp
call fcn.00403550
add esp, 4
test eax, eax
je 0x404c1a
call fcn.004163f0
mov eax, dword [eax]
mov dword [esp + 0x10], eax
jmp 0x404fc9
call fcn.004163f0
mov edx, dword [eax]
mov dword [esp + 0x10], edx
jmp 0x404fc7
mov ecx, dword [ebp + 0xa8]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x28]
mov eax, dword [esi + 0x108]
xor ebx, ebx
test eax, eax
mov dword [esp + 0x18], ecx
mov dword [esp + 0x24], 0x80
jbe 0x404d33
mov dword [esp + 0x10], ebx
lea esp, [esp]
mov eax, 1
xor edx, edx
mov ecx, ebx
call fcn.0041c800
mov ecx, eax
mov eax, dword [esi + 0x78]
and eax, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0x7c]
and ecx, edx
or eax, ecx
mov dword [esp + 0x20], edx
je 0x404d19
mov edx, dword [esi + 0x140]
mov eax, dword [esp + 0x10]
mov cl, byte [eax + edx + 2]
test cl, cl
mov ecx, dword [esp + 0x2b4]
jns 0x404dae
mov edx, dword [esp + 0x2b0]
push ecx
push edx
push ebx
push ebp
call fcn.0040d5b0
add esp, 0x10
test eax, eax
je 0x404d19
cmp ebx, dword [ebp + 0xe0]
jne 0x404cbb
or dword [esp + 0x24], 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x2b0]
or ecx, eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x20]
or esi, ecx
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x3c]
push esi
push edi
push edx
lea eax, [esp + 0x50]
push eax
push ebx
push ebp
call fcn.0040d840
add esp, 0x18
test eax, eax
jne 0x404d75
mov ecx, dword [esp + 0x2b4]
mov edx, dword [esp + 0x18]
push esi
push edi
push ecx
push edx
push ebx
push ebp
call fcn.0040d6a0
add esp, 0x18
test eax, eax
jne 0x404d75
mov esi, dword [esp + 0x28]
mov ecx, dword [esp + 0x10]
mov eax, dword [esi + 0x108]
inc ebx
add ecx, 0x2c
cmp ebx, eax
mov dword [esp + 0x10], ecx
jb 0x404c50
mov eax, dword [esi + 0x1d4]
test eax, eax
je 0x404d51
mov ecx, dword [esp + 0x2b4]
push ecx
push ebp
call eax
add esp, 8
mov dword [ebp + 0x90], eax
mov edx, dword [esp + 0x2b4]
mov eax, dword [esp + 0x3c]
push edx
push eax
push edi
push ebp
call dword [esi + 0x1c4]
add esp, 0x10
test eax, eax
je 0x405028
mov esi, dword [esp + 0x3c]
call fcn.004163f0
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
call fcn.004163f0
cmp dword [eax], 0x79
je 0x404e92
call fcn.004163f0
cmp dword [eax], 0x87
je 0x404e92
mov eax, dword [ebp]
or byte [eax + 0x9c], 2
jmp 0x404fbb
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x18]
push eax
push edi
push ecx
push edx
push ebx
push ebp
call fcn.0040c900
mov ecx, dword [esp + 0x2c8]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
push eax
push edi
push ecx
lea edx, [esp + 0x68]
push edx
push ebx
push ebp
call fcn.0040c900
mov ecx, dword [esp + 0x44]
add esp, 0x30
cmp ecx, eax
jne 0x404e04
mov edi, dword [esp + 0x18]
lea esi, [esp + 0x44]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
mov edi, dword [esp + 0x38]
je 0x404d15
mov esi, dword [esp + 0x28]
cmp ebx, dword [ebp + 0xe0]
jne 0x404e11
or dword [esp + 0x24], 4
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x2c]
or edx, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x20]
or ecx, edx
mov edx, dword [esp + 0x10]
push eax
mov dword [esp + 0x34], ecx
mov ecx, dword [esi + 0x140]
lea ecx, [edx + ecx + 0x10]
mov edx, dword [ecx]
lea eax, [esp + 0x48]
push eax
inc edx
push ebx
push ebp
mov dword [ecx], edx
call fcn.00405390
add esp, 0x10
test eax, eax
jne 0x404d71
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
push ecx
push edx
push ebx
push ebp
call fcn.00403b50
add esp, 0x10
test eax, eax
jne 0x404d71
mov ecx, dword [esi + 0x10c]
lea eax, [ebx + 1]
cmp ecx, eax
jne 0x404d19
mov dword [esp + 0x34], 1
jmp 0x404d19
mov eax, ebx
imul eax, eax, 0x2c
mov dword [ebp + 0xf0], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], eax
lea esp, [esp]
mov eax, 1
xor edx, edx
mov ecx, ebx
call fcn.0041c800
and eax, dword [esp + 0x2c]
and edx, dword [esp + 0x30]
or eax, edx
je 0x404fa5
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x140]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax + ecx + 2]
test dl, dl
jns 0x404f2f
mov eax, dword [esp + 0x1c]
mov edx, eax
inc eax
test edx, edx
mov dword [esp + 0x1c], eax
je 0x404f14
mov eax, dword [esp + 0x2b4]
mov ecx, dword [esp + 0x18]
push esi
push edi
push eax
push ecx
push ebx
push ebp
call fcn.0040d840
add esp, 0x18
test eax, eax
jne 0x404fbb
mov edx, dword [esp + 0x2b0]
push esi
push edi
push edx
lea eax, [esp + 0x50]
push eax
push ebx
push ebp
call fcn.0040d6a0
add esp, 0x18
jmp 0x404fa1
mov ecx, dword [esp + 0x2b4]
mov edx, dword [esp + 0x18]
push esi
push edi
push ecx
push edx
push ebx
push ebp
call fcn.0040c900
push esi
push edi
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x2d0]
push eax
lea ecx, [esp + 0x68]
push ecx
push ebx
push ebp
call fcn.0040c900
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x4c]
add esp, 0x30
mov edx, eax
inc eax
test edx, edx
mov dword [esp + 0x1c], eax
je 0x404f8d
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
push eax
push ecx
push ebx
push ebp
call fcn.00405390
add esp, 0x10
test eax, eax
jne 0x404fbb
mov edx, dword [esp + 0x40]
push edx
lea eax, [esp + 0x48]
push eax
push ebx
push ebp
call fcn.00403b50
add esp, 0x10
test eax, eax
jne 0x404fbb
mov edx, dword [esp + 0x14]
mov ecx, ebx
sub edx, 0x2c
dec ebx
test ecx, ecx
mov dword [esp + 0x14], edx
jne 0x404eb0
mov eax, dword [esp + 0x24]
or eax, 0x403
mov dword [ebp + 0x54], eax
xor esi, esi
cmp dword [0x42b8cc], esi
jl 0x404ff4
call fcn.004163f0
mov edx, dword [eax]
mov eax, dword [ebp + 0x74]
mov ecx, dword [ebp + 0x70]
push edx
mov edx, dword [esp + 0x2b8]
push eax
push ecx
push edx
push ebp
push 2
call fcn.0040d3d0
add esp, 0x18
push 1
push ebp
call fcn.004033d0
mov eax, dword [esp + 0x18]
add esp, 8
cmp eax, 0x78
jne 0x405010
mov dword [esp + 0x10], 0x7e
call fcn.004163f0
mov ecx, dword [esp + 0x10]
pop edi
pop esi
pop ebp
mov dword [eax], ecx
mov eax, ecx
pop ebx
add esp, 0x298
ret
mov eax, dword [esp + 0x34]
test eax, eax
je 0x405041
mov eax, dword [esp + 0x2b4]
push eax
push ebp
call fcn.0040cfb0
add esp, 8
mov eax, dword [esi + 0x1d4]
test eax, eax
je 0x405065
mov ecx, dword [ebp + 0x90]
mov edx, dword [esp + 0x40]
mov eax, dword [esi + 0x80]
sub ecx, edx
add eax, ecx
mov dword [esi + 0x80], eax
mov esi, dword [esp + 0x24]
mov edx, esi
or edx, 0x403
mov dword [ebp + 0x54], edx
mov eax, dword [0x42b8cc]
test eax, eax
jl 0x40509a
mov eax, dword [ebp + 0x74]
mov ecx, dword [ebp + 0x70]
mov edx, dword [esp + 0x2b4]
push 0
push eax
push ecx
push edx
push ebp
push 2
call fcn.0040d3d0
add esp, 0x18
xor eax, eax
test esi, esi
setne al
push eax
push ebp
call fcn.004033d0
add esp, 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x298
ret