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

Disassembly:
sub esp, 0x74
push ebx
push ebp
mov ebp, dword [esp + 0x80]
xor ebx, ebx
push esi
push edi
push 0x18
lea esi, [ebp + 0x37e864]
pop ecx
lea edi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
lea esi, [ebp + 0x10]
movsx eax, byte [esi]
add eax, 0xfffffff5
cmp eax, 0x12
ja case.0x408763.12
push 8
pop edi
jmp dword [eax*4 + 0x4090b3]
push ebp
push edi
lea eax, [esp + 0x1c]
mov byte [esi], 0xb
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
cmp dword [esp + 0x14], 0x17
jne 0x408792
mov byte [esi], 1
push 4
jmp 0x4089b8
cmp dword [esp + 0x14], 0x31
jne 0x4089b6
mov dword [ebp + 0x2c], ebx
push ebp
push edi
lea eax, [esp + 0x1c]
mov byte [esi], 0xd
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x14]
mov dword [ebp + 0x2c], eax
push ebp
push edi
lea eax, [esp + 0x1c]
mov byte [esi], 0xe
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x14]
mov dword [ebp + 0x2c], eax
push ebp
push edi
lea eax, [esp + 0x1c]
mov byte [esi], 0xf
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [ebp + 0x2c]
shl eax, 8
or eax, dword [esp + 0x14]
mov dword [ebp + 0x2c], eax
jl 0x4089b6
cmp eax, 0xdbbaa
jg 0x4089b6
mov edi, ebx
jmp 0x40884d
mov edi, dword [esp + 0x24]
push ebp
push 1
lea eax, [esp + 0x1c]
mov byte [esi], 0x10
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
cmp dword [esp + 0x14], 1
sete al
mov byte [edi + ebp + 0x36fbbc], al
inc edi
mov dword [esp + 0x24], edi
cmp edi, 0x10
jl 0x408825
push 0x100
lea eax, [ebp + 0x36fabc]
push ebx
push eax
call fcn.004092dc
add esp, 0xc
mov edi, ebx
jmp 0x4088b2
mov edi, dword [esp + 0x24]
push ebp
push 1
lea eax, [esp + 0x1c]
mov byte [esi], 0x11
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
cmp dword [esp + 0x14], 1
jne 0x4088a3
mov eax, edi
shl eax, 4
add eax, dword [esp + 0x28]
mov byte [eax + ebp + 0x36fabc], 1
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, 0x10
jl 0x408873
inc edi
mov dword [esp + 0x24], edi
cmp edi, 0x10
jge 0x4088c8
cmp byte [edi + ebp + 0x36fbbc], bl
je 0x4088b1
mov eax, ebx
jmp 0x4088a8
mov dword [ebp + 0x36fab8], ebx
mov ecx, ebx
cmp byte [ecx + ebp + 0x36fabc], bl
je 0x4088ec
mov eax, dword [ebp + 0x36fab8]
mov byte [eax + ebp + 0x36fbcc], cl
inc dword [ebp + 0x36fab8]
inc ecx
cmp ecx, 0x100
jl 0x4088d0
mov eax, dword [ebp + 0x36fab8]
test eax, eax
je 0x4089b6
add eax, 2
lea esi, [ebp + 0x10]
mov dword [esp + 0x30], eax
push ebp
push 3
lea eax, [esp + 0x3c]
mov byte [esi], 0x12
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
cmp dword [esp + 0x34], 2
jl 0x4089b6
cmp dword [esp + 0x34], 6
jg 0x4089b6
push ebp
push 0xf
lea eax, [esp + 0x40]
mov byte [esi], 0x13
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov ecx, dword [esp + 0x38]
cmp ecx, 1
jl 0x4089b6
mov eax, dword [esp + 0x34]
mov esi, ebx
mov dword [esp + 0x18], eax
jmp 0x40899b
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x18], edi
push ebp
push 1
lea eax, [esp + 0x1c]
mov byte [ebp + 0x10], 0x14
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x14], ebx
jne 0x4089ad
mov ecx, dword [esp + 0x38]
mov byte [esi + ebp + 0x37535e], al
inc esi
mov eax, dword [esp + 0x34]
mov dword [esp + 0x24], esi
cmp esi, ecx
jge 0x4089d4
mov edi, dword [esp + 0x34]
mov dword [esp + 0x28], ebx
jmp 0x40896c
inc eax
mov dword [esp + 0x28], eax
cmp eax, edi
jl 0x40896c
push 0xfffffffffffffffc
pop ebx
push 0x18
pop ecx
lea edi, [ebp + 0x37e864]
mov eax, ebx
lea esi, [esp + 0x24]
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x74
ret 4
mov dl, bl
test eax, eax
jle 0x4089e9
mov esi, ebx
mov byte [esp + esi + 0x1c], dl
inc dl
movzx esi, dl
cmp esi, eax
jl 0x4089dc
mov dword [esp + 0x24], ebx
test ecx, ecx
jle 0x408a3b
lea esi, [ebp + 0x370d0c]
mov dword [esp + 0x24], ecx
mov al, byte [esi + 0x4652]
lea edx, [esp + 0x1c]
mov byte [esp + 0x12], al
movzx eax, al
add edx, eax
mov ah, byte [esp + 0x12]
mov al, byte [edx]
mov byte [esp + 0x13], al
test ah, ah
je 0x408a2b
mov al, byte [edx - 1]
mov byte [edx], al
dec edx
sub ah, 1
jne 0x408a1c
mov al, byte [esp + 0x13]
mov byte [esi], al
inc esi
mov byte [esp + 0x1c], al
sub ecx, 1
jne 0x4089fb
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edi, ebx
jmp 0x408b0a
mov edi, dword [esp + 0x2c]
jmp 0x408ab8
mov edi, dword [esp + 0x2c]
jmp 0x408a9a
push ebp
push 5
lea eax, [esp + 0x64]
mov byte [ebp + 0x10], 0x15
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov edi, dword [esp + 0x2c]
mov edx, ebx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x24], edx
cmp edx, ecx
jge 0x408b01
mov eax, dword [esp + 0x5c]
cmp eax, 1
jl 0x4089b6
cmp eax, 0x14
jg 0x4089b6
lea esi, [ebp + 0x10]
push ebp
push 1
lea eax, [esp + 0x1c]
mov byte [esi], 0x16
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
cmp dword [esp + 0x14], ebx
je 0x408ae4
push ebp
push 1
lea eax, [esp + 0x1c]
mov byte [esi], 0x17
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [esp + 0x5c]
cmp dword [esp + 0x14], ebx
jne 0x408ae1
inc eax
mov dword [esp + 0x5c], eax
jmp 0x408a85
dec eax
jmp 0x408adb
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x5c]
imul eax, edi, 0x102
add eax, edx
inc edx
mov byte [eax + ebp + 0x3799b0], cl
jmp 0x408a71
mov eax, dword [esp + 0x34]
inc edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x2c], edi
cmp edi, eax
jl case.0x408763.21
mov dword [esp + 0x2c], ebx
test eax, eax
jle 0x408bb9
lea edx, [ebp + 0x37e84c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], edx
lea edi, [ebp + 0x37b7ec]
lea edx, [ebp + 0x3799b0]
mov dword [esp + 0x14], edx
mov ebp, edx
mov edx, ebx
push 0x20
pop esi
test ecx, ecx
jle 0x408b72
mov ebx, ebp
mov ebp, ecx
mov ecx, esi
movzx esi, byte [ebx]
cmp esi, edx
mov eax, esi
cmovle eax, edx
cmp esi, ecx
mov edx, eax
cmovge esi, ecx
inc ebx
sub ebp, 1
jne 0x408b4f
mov ecx, dword [esp + 0x30]
xor ebx, ebx
mov ebp, dword [esp + 0x14]
push ecx
push edx
push esi
push ebp
lea eax, [edi + 0x1830]
push eax
push edi
lea eax, [edi - 0x1830]
push eax
call fcn.004091dd
mov eax, dword [esp + 0x1c]
add ebp, 0x102
mov ecx, dword [esp + 0x30]
add edi, 0x408
mov dword [esp + 0x14], ebp
mov dword [eax], esi
add eax, 4
sub dword [esp + 0x18], 1
mov dword [esp + 0x1c], eax
jne 0x408b42
mov ebp, dword [esp + 0x88]
mov eax, dword [ebp + 0x36fab8]
lea edi, [ebp + 0x30]
or dword [esp + 0x40], 0xffffffff
inc eax
mov edx, 0x100
mov dword [esp + 0x3c], eax
mov ecx, edx
mov dword [esp + 0x24], edx
xor eax, eax
mov dword [esp + 0x4c], 0xdbba0
rep stosd dword es:[edi], eax
push 0xf
mov dword [esp + 0x48], ebx
lea edi, [ebp + 0x370d08]
pop ecx
mov edx, 0x1000
lea esi, [edx + 0x36fccb]
mov ah, cl
push 0xf
shl ah, 4
add esi, ebp
pop ebx
sub edx, 0x10
mov al, ah
add al, bl
mov byte [esi], al
dec esi
sub ebx, 1
jns 0x408c08
mov dword [edi], edx
sub edi, 4
sub ecx, 1
jns 0x408bf5
push ebp
lea eax, [esp + 0x28]
xor ebx, ebx
push eax
mov dword [esp + 0x58], ebx
call fcn.00409166
test eax, eax
jne 0x4089b6
lea esi, [ebp + 0x10]
push ebp
push dword [esp + 0x68]
lea eax, [esp + 0x70]
mov byte [esi], 0x18
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov edx, dword [esp + 0x68]
jmp 0x408c84
push ebp
push 1
lea eax, [esp + 0x74]
mov byte [esi], 0x19
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [esp + 0x68]
lea esi, [ebp + 0x10]
lea edx, [eax + eax]
or edx, dword [esp + 0x6c]
mov dword [esp + 0x68], edx
mov ecx, dword [esp + 0x64]
cmp ecx, 0x14
jg 0x4089b6
mov eax, dword [esp + 0x78]
cmp edx, dword [eax + ecx*4]
jle 0x408ca1
inc ecx
mov dword [esp + 0x64], ecx
jmp case.0x408763.25
mov eax, dword [esp + 0x7c]
sub edx, dword [eax + ecx*4]
cmp edx, 0x101
ja 0x4089b6
mov eax, dword [esp + 0x80]
mov esi, dword [esp + 0x50]
mov edx, dword [eax + edx*4]
mov dword [esp + 0x48], edx
jmp 0x408db7
push ebp
push dword [esp + 0x68]
lea eax, [esp + 0x70]
mov byte [esi], 0x1a
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
cmp ecx, 0x14
jg 0x4089b6
mov eax, dword [esp + 0x78]
cmp edx, dword [eax + ecx*4]
jle 0x408d30
inc ecx
lea esi, [ebp + 0x10]
mov dword [esp + 0x64], ecx
push ebp
push 1
lea eax, [esp + 0x74]
mov byte [esi], 0x1b
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [esp + 0x68]
lea edx, [eax + eax]
or edx, dword [esp + 0x6c]
mov dword [esp + 0x68], edx
jmp 0x408ce9
mov eax, dword [esp + 0x7c]
sub edx, dword [eax + ecx*4]
cmp edx, 0x101
ja 0x4089b6
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
mov edx, dword [eax + edx*4]
mov eax, dword [esp + 0x58]
mov dword [esp + 0x48], edx
test edx, edx
je 0x408fca
cmp edx, 1
je 0x408fd0
mov eax, dword [ebp + 0x370ccc]
inc ecx
mov dword [esp + 0x54], ecx
movzx eax, byte [eax + ebp + 0x36fccc]
movzx edi, byte [eax + ebp + 0x36fbcc]
add dword [ebp + edi*4 + 0x30], ecx
test ecx, ecx
jle 0x408db7
lea eax, [esi*4 + 0xc38]
add eax, ebp
cmp esi, dword [esp + 0x4c]
jge 0x4089b6
inc esi
mov dword [eax], edi
add eax, 4
mov dword [esp + 0x50], esi
dec ecx
mov dword [esp + 0x54], ecx
test ecx, ecx
jg 0x408d9a
cmp edx, dword [esp + 0x3c]
je 0x408ffc
test edx, edx
je 0x408fb7
cmp edx, 1
je 0x408fb7
cmp esi, dword [esp + 0x4c]
jge 0x4089b6
dec edx
cmp edx, 0x10
jae 0x408e18
mov edi, dword [ebp + 0x370ccc]
lea ecx, [edi + 0x36fccc]
add ecx, edx
add ecx, ebp
movzx eax, byte [ecx]
mov dword [esp + 0x14], eax
test edx, edx
je 0x408e0c
mov al, byte [ecx - 1]
mov byte [ecx], al
dec ecx
sub edx, 1
jne 0x408dfd
mov eax, dword [esp + 0x14]
mov byte [edi + ebp + 0x36fccc], al
jmp 0x408efc
mov edi, edx
and edx, 0xf
shr edi, 4
mov eax, dword [ebp + edi*4 + 0x370ccc]
add edx, eax
lea ecx, [edx + 0x36fccc]
add ecx, ebp
mov dword [esp + 0x1c], ecx
movzx ecx, byte [ecx]
mov dword [esp + 0x14], ecx
cmp edx, eax
jle 0x408e5a
mov ebx, dword [esp + 0x1c]
mov al, byte [ebx - 1]
dec edx
mov byte [ebx], al
lea ebx, [ebx - 1]
mov eax, dword [ebp + edi*4 + 0x370ccc]
cmp edx, eax
jg 0x408e44
xor ebx, ebx
inc eax
mov dword [ebp + edi*4 + 0x370ccc], eax
test edi, edi
je 0x408e8b
lea edx, [edi*4 + 0x370ccc]
add edx, ebp
dec dword [edx]
dec edi
mov ecx, dword [edx]
lea edx, [edx - 4]
mov eax, dword [edx]
mov al, byte [eax + ebp + 0x36fcdb]
mov byte [ecx + ebp + 0x36fccc], al
test edi, edi
jg 0x408e6f
mov eax, dword [ebp + 0x370ccc]
mov ecx, dword [esp + 0x14]
dec eax
mov dword [ebp + 0x370ccc], eax
mov byte [eax + ebp + 0x36fccc], cl
cmp dword [ebp + 0x370ccc], ebx
jne 0x408ef8
mov dword [esp + 0x1c], 0xf
lea edx, [ebp + 0x370d08]
mov edi, 0x1000
lea esi, [edi + 0x36fccb]
push 0xf
add esi, ebp
sub edi, 0x10
pop ebx
mov eax, dword [edx]
lea ecx, [ebx + ebp]
mov al, byte [ecx + eax + 0x36fccc]
mov byte [esi], al
dec esi
sub ebx, 1
jns 0x408ecc
mov eax, dword [esp + 0x1c]
dec eax
mov dword [edx], edi
sub edx, 4
mov dword [esp + 0x1c], eax
test eax, eax
jns 0x408ebe
mov esi, dword [esp + 0x50]
xor ebx, ebx
mov eax, dword [esp + 0x14]
movzx eax, byte [eax + ebp + 0x36fbcc]
push ebp
inc dword [ebp + eax*4 + 0x30]
mov eax, dword [esp + 0x18]
movzx eax, byte [eax + ebp + 0x36fbcc]
mov dword [ebp + esi*4 + 0xc38], eax
lea eax, [esp + 0x28]
inc esi
push eax
mov dword [esp + 0x58], esi
call fcn.00409166
test eax, eax
jne 0x4089b6
lea esi, [ebp + 0x10]
push ebp
push dword [esp + 0x68]
lea eax, [esp + 0x70]
mov byte [esi], 0x1c
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov edx, dword [esp + 0x68]
mov ecx, dword [esp + 0x64]
cmp ecx, 0x14
jg 0x4089b6
mov eax, dword [esp + 0x78]
cmp edx, dword [eax + ecx*4]
jle 0x408f99
inc ecx
mov dword [esp + 0x64], ecx
push ebp
push 1
lea eax, [esp + 0x74]
mov byte [ebp + 0x10], 0x1d
push eax
call fcn.004090ff
test eax, eax
jne case.0x408763.12
mov eax, dword [esp + 0x68]
lea edx, [eax + eax]
or edx, dword [esp + 0x6c]
mov dword [esp + 0x68], edx
jmp 0x408f54
mov eax, dword [esp + 0x7c]
sub edx, dword [eax + ecx*4]
js 0x4089b6
cmp edx, 0x102
jge 0x4089b6
jmp 0x408cb4
or ecx, 0xffffffff
xor eax, eax
inc eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], eax
jmp 0x408d5d
add ecx, eax
mov dword [esp + 0x54], ecx
add eax, eax
mov dword [esp + 0x58], eax
cmp edx, 1
jne 0x408fe1
add ecx, eax
mov dword [esp + 0x54], ecx
push ebp
lea eax, [esp + 0x28]
push eax
call fcn.00409166
test eax, eax
jne 0x4089b6
lea esi, [ebp + 0x10]
jmp case.0x408763.26
cmp dword [ebp + 0x2c], 0
jl 0x4089b6
cmp dword [ebp + 0x2c], esi
jge 0x4089b6
mov dword [ebp + 0x14], ebx
lea ecx, [ebp + 0x30]
mov word [ebp + 0x10], 2
mov esi, 0x100
mov dword [ebp + 0x430], ebx
mov eax, dword [ecx + 0x400]
add eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [ecx + 0x400], eax
sub esi, 1
jne 0x409026
mov esi, dword [esp + 0x50]
mov edi, ebx
mov dword [esp + 0x24], edi
test esi, esi
jle 0x40907b
lea ebx, [ebp + 0xc38]
movzx edx, byte [ebx]
mov eax, edi
shl eax, 8
lea ebx, [ebx + 4]
mov ecx, dword [ebp + edx*4 + 0x430]
or dword [ebp + ecx*4 + 0xc38], eax
inc dword [ebp + edx*4 + 0x430]
inc edi
cmp edi, esi
jl 0x409050
mov dword [esp + 0x24], edi
xor ebx, ebx
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + eax*4 + 0xc38]
shr ecx, 8
mov dword [ebp + 0x20], ecx
mov dword [ebp + 0x18], ebx
mov ecx, dword [ebp + ecx*4 + 0xc38]
mov dword [ebp + 0x20], ecx
movzx eax, cl
shr ecx, 8
mov dword [ebp + 0x1c], eax
mov dword [ebp + 0x20], ecx
mov dword [ebp + 0x18], 1
jmp case.0x408763.12