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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4696ec
mov eax, dword fs:[0]
push eax
sub esp, 0x1f0
mov eax, dword [0x486a20]
xor eax, esp
mov dword [esp + 0x1e8], eax
push ebx
push esi
push edi
mov eax, dword [0x486a20]
xor eax, esp
push eax
lea eax, [esp + 0x200]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov ebx, edx
cmp byte [ebx + 0x41c], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x7c], ecx
je 0x403afb
mov eax, dword [ebx + 0x420]
mov edx, dword [ebx + 0x424]
add eax, 8
imul eax, dword [ebp + 8]
xor edi, edi
push edi
add eax, 0x10c
lea esi, [ebx + 0x424]
push edi
push eax
mov eax, dword [edx + 0x28]
mov ecx, esi
call eax
mov eax, dword [ebx + 0x420]
mov edx, dword [esi]
mov edx, dword [edx + 0x34]
push eax
lea ecx, [esp + 0xf0]
push ecx
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push 4
lea ecx, [esp + 0x78]
push ecx
mov ecx, esi
call edx
mov eax, dword [esi]
mov edx, dword [eax + 0x34]
push 4
lea ecx, [esp + 0x60]
push ecx
mov ecx, esi
call edx
mov eax, dword [esp + 0x5c]
push eax
call fcn.0041a3db
mov edx, dword [ebx + 0x434]
mov edx, dword [edx + 0x28]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x74]
sub eax, dword [esp + 0x5c]
push edi
add ebx, 0x434
push edi
push eax
mov ecx, ebx
call edx
mov ecx, dword [esp + 0x5c]
mov eax, dword [ebx]
mov edx, dword [eax + 0x34]
push ecx
push esi
mov ecx, ebx
call edx
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x208], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov byte [esp + 0x208], 2
call fcn.00409220
mov dword [esp + 0x20], eax
mov byte [eax + 0x1d], 1
mov eax, dword [esp + 0x20]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x20]
mov dword [eax], eax
mov eax, dword [esp + 0x20]
mov dword [eax + 8], eax
mov dword [esp + 0x24], edi
mov byte [esp + 0x208], 3
xor ebx, ebx
cmp dword [esp + 0x5c], edi
jbe 0x403a16
xor byte [ebx + esi], 0x81
mov al, byte [ebx + esi]
mov edi, dword [esp + 0x44]
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x40]
test eax, eax
je 0x4039e6
mov edx, dword [esp + 0x48]
mov ecx, edi
sub ecx, eax
sub edx, eax
cmp ecx, edx
jae 0x4039e6
mov cl, byte [esp + 0x17]
mov eax, edi
add eax, 1
mov byte [edi], cl
mov dword [esp + 0x44], eax
jmp 0x403a0b
cmp eax, edi
jbe 0x4039ef
call fcn.00450e44
push edi
lea eax, [esp + 0x40]
push eax
lea edx, [esp + 0x1f]
push edx
lea eax, [esp + 0x8c]
push eax
lea eax, [esp + 0x4c]
call fcn.00407d00
add ebx, 1
cmp ebx, dword [esp + 0x5c]
jb 0x4039b0
xor edi, edi
push esi
call fcn.0041a3d6
mov eax, dword [esp + 0x80]
add esp, 4
mov dword [esp + 0x68], edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x403a30
sub eax, edx
sar eax, 1
mov esi, eax
xor ecx, ecx
lea eax, [esi + 2]
mov edx, 2
mul edx
seto cl
mov dword [esp + 0x64], esi
neg ecx
or ecx, eax
push ecx
call fcn.0041a3db
add esp, 4
cmp esi, edi
mov dword [esp + 0x60], eax
mov byte [esp + 0x17], 0
jg 0x403b02
mov byte [esp + 0x208], 2
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
mov esi, ecx
push esi
lea eax, [esp + 0x90]
push eax
mov edi, ecx
call fcn.00408600
mov ecx, dword [esp + 0x20]
push ecx
call fcn.0041a3d6
mov eax, dword [esp + 0x30]
xor esi, esi
add esp, 4
cmp eax, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
je 0x403ac1
push eax
call fcn.0041a3d6
add esp, 4
mov eax, dword [esp + 0x50]
cmp eax, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
je 0x403ade
push eax
call fcn.0041a3d6
add esp, 4
mov eax, dword [esp + 0x40]
cmp eax, esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
je 0x403afb
push eax
call fcn.0041a3d6
add esp, 4
xor eax, eax
jmp 0x404190
lea edx, [esp + 0xec]
push 0x5c
push edx
mov dword [esp + 0x80], edi
call fcn.00450e60
mov ebx, eax
add esp, 8
cmp ebx, edi
je 0x403b6c
push 0x2e
push ebx
call fcn.00450e60
add esp, 8
cmp eax, edi
je 0x403b6c
mov esi, eax
sub esi, ebx
lea eax, [esi - 1]
push eax
add ebx, 1
lea ecx, [esp + 0xe4]
push ebx
push ecx
call fcn.00450b00
lea edx, [esp + 0xec]
add esp, 0xc
push edx
mov byte [esp + esi + 0xe4], 0
call fcn.00450e9e
mov esi, dword [esp + 0x68]
add esp, 4
mov dword [esp + 0x78], eax
cmp esi, edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], edi
jbe 0x4040f6
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x6c]
movzx ecx, word [eax + ebx*2]
cmp cx, 0x20
je 0x403e13
cmp cx, 0x3000
je 0x403e13
mov cx, word [eax + ebx*2]
mov edx, dword [esp + 0x60]
mov word [edx + edi*2], cx
movzx eax, word [eax + ebx*2]
mov edx, dword [esp + 0x50]
mov esi, dword [esp + 0x54]
add edi, 1
test edx, edx
mov dword [esp + 0x68], edi
mov dword [esp + 0x18], eax
je 0x403beb
mov ecx, dword [esp + 0x58]
mov eax, esi
sub eax, edx
sub ecx, edx
sar eax, 1
sar ecx, 1
cmp eax, ecx
jae 0x403beb
mov cx, word [esp + 0x18]
mov word [esi], cx
add esi, 2
mov dword [esp + 0x54], esi
jmp 0x403c10
cmp edx, esi
jbe 0x403bf4
call fcn.00450e44
push esi
lea eax, [esp + 0x50]
push eax
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0xc4]
push eax
lea eax, [esp + 0x5c]
call fcn.00407d90
mov ecx, dword [esp + 0x64]
add ecx, 0xffffffff
cmp ebx, ecx
mov byte [esp + 0x17], 1
jb 0x4040e1
mov edx, dword [esp + 0x60]
mov word [edx + edi*2], 0
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0xb0]
push ecx
lea ebx, [esp + 0x2c]
lea esi, [esp + 0x20]
mov dword [esp + 0xa0], eax
call fcn.004077a0
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x403c5e
lea edx, [esp + 0x1c]
cmp eax, edx
je 0x403c63
call fcn.00450e44
mov eax, dword [esp + 0x9c]
cmp dword [esi + 4], eax
jne 0x4040e1
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0xd8]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00407630
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x50]
push edx
call fcn.00402720
mov ebx, dword [esp + 0x40]
mov edi, dword [ebx + 8]
add esp, 8
cmp dword [ebx + 4], edi
jbe 0x403cad
call fcn.00450e44
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 8]
jbe 0x403cba
call fcn.00450e44
push edi
push ebx
push esi
push ebx
lea eax, [esp + 0xd0]
push eax
call fcn.00402de0
mov eax, dword [esp + 0x78]
and eax, 0x80000001
mov edx, dword [ebp + 0x10]
lea ecx, [esp + 0x70]
push ecx
push edx
jns 0x403ce4
dec eax
or eax, 0xfffffffe
inc eax
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x38]
mov ecx, ebx
call fcn.00404200
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
cmp ecx, eax
mov esi, eax
jbe 0x403d10
call fcn.00450e44
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x50]
cmp ecx, eax
lea edi, [esp + 0x4c]
mov ebx, ecx
jbe 0x403d1f
call fcn.00450e44
push esi
push edi
push ebx
lea eax, [esp + 0x58]
push eax
lea edx, [esp + 0xb8]
push edx
mov ebx, eax
call fcn.004075d0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
mov edi, eax
jbe 0x403d51
call fcn.00450e44
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
cmp ecx, eax
lea esi, [esp + 0x28]
mov ebx, ecx
jbe 0x403d60
call fcn.00450e44
push edi
push esi
push ebx
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0xb0]
push eax
lea ebx, [esp + 0x3c]
call fcn.00402de0
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
cmp ecx, eax
mov ebx, eax
jbe 0x403d94
call fcn.00450e44
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
cmp ecx, eax
lea esi, [esp + 0x3c]
mov edi, ecx
jbe 0x403da3
call fcn.00450e44
push ebx
push esi
lea eax, [esp + 0x44]
push edi
push eax
lea ecx, [esp + 0xf0]
push ecx
mov ebx, eax
call fcn.00402de0
mov edi, dword [esp + 0x38]
mov esi, dword [edi + 8]
cmp dword [edi + 4], esi
jbe 0x403dcb
call fcn.00450e44
mov ebx, dword [edi + 4]
cmp ebx, dword [edi + 8]
jbe 0x403dd8
call fcn.00450e44
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x40], eax
mov dword [esp + 0x18], eax
jbe 0x403deb
call fcn.00450e44
mov edx, dword [esp + 0x18]
push esi
push edi
push ebx
push edi
push edx
lea eax, [esp + 0x50]
push eax
mov eax, dword [esp + 0x8c]
push eax
lea esi, [esp + 0x58]
call fcn.004095b0
mov edi, dword [esp + 0x68]
jmp 0x4040e1
cmp byte [esp + 0x17], 0
je 0x4040da
mov ecx, dword [esp + 0x60]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x50]
push eax
mov word [ecx + edi*2], 0
call fcn.00402720
mov ecx, dword [esp + 0x28]
add esp, 8
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x20]
mov dword [esp + 0x88], ecx
call fcn.004086d0
mov ebx, eax
cmp ebx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x88], eax
je 0x403ee4
mov eax, dword [ebx + 0x14]
cmp dword [ebx + 0x10], eax
mov dword [esp + 0x18], eax
jbe 0x403e7e
call fcn.00450e44
mov esi, dword [ebx + 0x10]
cmp esi, dword [ebx + 0x14]
jbe 0x403e8b
call fcn.00450e44
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x2c]
cmp ebx, eax
mov edi, eax
jbe 0x403eaf
call fcn.00450e44
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x2c]
cmp ebx, eax
jbe 0x403eaf
call fcn.00450e44
cmp ebx, edi
mov eax, ebx
je 0x403ed5
cmp esi, dword [esp + 0x18]
je 0x403ed1
mov cl, byte [eax]
mov dl, byte [esi]
cmp dl, cl
ja 0x403ee4
jb 0x403edb
add eax, 1
add esi, 1
cmp eax, edi
jne 0x403eb5
jmp 0x403ed5
cmp eax, edi
jne 0x403edb
cmp esi, dword [esp + 0x18]
jne 0x403ee4
lea eax, [esp + 0x88]
jmp 0x403f01
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x1c]
mov dword [esp + 0x94], ecx
mov dword [esp + 0x90], edx
lea eax, [esp + 0x90]
mov ecx, dword [eax]
test ecx, ecx
mov esi, dword [eax + 4]
je 0x403f12
lea eax, [esp + 0x1c]
cmp ecx, eax
je 0x403f17
call fcn.00450e44
cmp esi, dword [esp + 0x84]
jne 0x4040da
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0xcc]
push edx
lea eax, [esp + 0x24]
push eax
call fcn.00407630
mov edi, dword [esp + 0x38]
mov ebx, dword [edi + 8]
cmp dword [edi + 4], ebx
jbe 0x403f4c
call fcn.00450e44
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
jbe 0x403f59
call fcn.00450e44
cmp esi, ebx
je 0x403f7e
mov eax, dword [edi + 8]
sub eax, ebx
test eax, eax
lea edi, [eax + esi]
jle 0x403f75
push eax
push ebx
push eax
push esi
call fcn.00450aa4
add esp, 0x10
mov ecx, dword [esp + 0x38]
mov dword [ecx + 8], edi
mov edi, ecx
mov ecx, dword [esp + 0x78]
and ecx, 0x80000001
mov eax, dword [ebp + 0x10]
lea edx, [esp + 0x70]
push edx
push eax
jns 0x403f98
dec ecx
or ecx, 0xfffffffe
inc ecx
push ecx
lea edx, [esp + 0x48]
push edx
lea edx, [esp + 0x38]
mov ecx, edi
call fcn.00404200
mov eax, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
cmp ebx, eax
mov esi, eax
jbe 0x403fd1
call fcn.00450e44
mov eax, dword [esp + 0x54]
mov ebx, dword [esp + 0x50]
cmp ebx, eax
jbe 0x403fd1
call fcn.00450e44
mov eax, dword [esp + 0x54]
cmp ebx, esi
je 0x403ff7
sub eax, esi
sar eax, 1
test eax, eax
lea ecx, [eax + eax]
lea edi, [ecx + ebx]
jle 0x403fef
push ecx
push esi
push ecx
push ebx
call fcn.00450aa4
add esp, 0x10
mov dword [esp + 0x54], edi
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
cmp esi, eax
mov ebx, eax
jbe 0x40401f
call fcn.00450e44
mov eax, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
cmp esi, eax
jbe 0x40401f
call fcn.00450e44
mov eax, dword [esp + 0x30]
cmp esi, ebx
je 0x404044
sub eax, ebx
test eax, eax
lea ecx, [eax + esi]
mov dword [esp + 0x18], ecx
jle 0x40403c
push eax
push ebx
push eax
push esi
call fcn.00450aa4
add esp, 0x10
mov edx, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x40], eax
mov ebx, eax
jbe 0x404059
call fcn.00450e44
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
jbe 0x40406a
call fcn.00450e44
mov eax, dword [esp + 0x44]
cmp esi, ebx
je 0x40408d
sub eax, ebx
test eax, eax
lea edi, [eax + esi]
jle 0x404083
push eax
push ebx
push eax
push esi
call fcn.00450aa4
add esp, 0x10
mov eax, edi
mov edi, dword [esp + 0x38]
mov dword [esp + 0x44], eax
mov ecx, dword [edi + 8]
cmp dword [edi + 4], ecx
mov dword [esp + 0x18], ecx
jbe 0x4040a2
call fcn.00450e44
mov eax, dword [esp + 0x44]
mov ebx, dword [edi + 4]
cmp ebx, dword [edi + 8]
jbe 0x4040b3
call fcn.00450e44
mov eax, dword [esp + 0x44]
cmp dword [esp + 0x40], eax
mov esi, eax
jbe 0x4040c0
call fcn.00450e44
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x74]
push ecx
push edi
push ebx
push edi
push esi
lea eax, [esp + 0x50]
push eax
push edx
mov esi, eax
call fcn.004095b0
xor edi, edi
mov byte [esp + 0x17], 0
mov eax, dword [esp + 0x6c]
add eax, 1
cmp eax, dword [esp + 0x64]
mov dword [esp + 0x6c], eax
jb 0x403b80
mov eax, dword [esp + 0x60]
push eax
call fcn.0041a3d6
add esp, 4
mov byte [esp + 0x208], 2
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x20]
push ecx
mov esi, ecx
push edx
push esi
lea ecx, [esp + 0xf0]
push ecx
mov edi, esi
call fcn.00408600
mov edx, dword [esp + 0x20]
push edx
call fcn.0041a3d6
mov eax, dword [esp + 0x30]
xor esi, esi
add esp, 4
cmp eax, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
je 0x404152
push eax
call fcn.0041a3d6
add esp, 4
mov eax, dword [esp + 0x50]
cmp eax, esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
je 0x40416f
push eax
call fcn.0041a3d6
add esp, 4
mov eax, dword [esp + 0x40]
cmp eax, esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
je 0x40418c
push eax
call fcn.0041a3d6
add esp, 4
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x200]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1e8]
xor ecx, esp
call fcn.00450581
mov esp, ebp
pop ebp
ret 0xc