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

Disassembly:
push 0xffffffffffffffff
push 0x4937e5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0xf4]
push 0x4ca954
push eax
mov dword [esp + 0xf0], 0
call dword [0x496484]
add esp, 8
test al, al
je 0x4083e3
push 1
lea ecx, [esp + 0xf8]
mov dword [esp + 0xec], 0xffffffff
call dword [0x4964c4]
jmp 0x408b72
mov cl, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x24], esp
push 0
mov byte [ebp], cl
mov ecx, ebp
call dword [0x4964c4]
mov edi, 0x4ca954
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call dword [0x496490]
test al, al
je 0x40843e
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x4ca954
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call dword [0x496494]
sub esp, 0x10
lea eax, [esp + 0x3b]
mov ecx, esp
mov dword [esp + 0x4c], esp
push eax
push 0x4bf718
mov byte [esp + 0x110], 1
call dword [0x4964cc]
lea ecx, [esp + 0x114]
lea edx, [esp + 0x68]
push ecx
push edx
mov byte [esp + 0x110], 0
call fcn.00407cf0
add esp, 0x28
mov eax, dword [esp + 0x4c]
xor ebx, ebx
mov byte [esp + 0xe8], 2
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x14], ebx
mov edi, dword [esp + 0x50]
test eax, eax
je 0x408b11
mov ecx, edi
sub ecx, eax
sar ecx, 4
cmp ebx, ecx
jae 0x408b11
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x20]
lea edi, [eax + edx]
mov al, byte [eax + edx]
mov byte [esp + 0x20], al
call dword [0x4964c4]
mov ecx, dword [0x4964a8]
mov edx, dword [ecx]
lea ecx, [esp + 0x1c]
push edx
push 0
push edi
call dword [0x49648c]
push 1
lea eax, [esp + 0x17]
push 0
push eax
lea ecx, [esp + 0x28]
mov byte [esp + 0xf4], 3
mov byte [esp + 0x1f], 0x5b
call dword [0x4964a0]
push 1
lea ecx, [esp + 0x17]
push 0
push ecx
lea ecx, [esp + 0x28]
mov ebp, eax
mov byte [esp + 0x1f], 0x5d
call dword [0x4964a0]
mov esi, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x30], esi
je 0x408948
cmp esi, 0xffffffff
je 0x408948
mov edx, esi
lea eax, [ebp + 1]
sub edx, ebp
lea ecx, [esp + 0xb8]
dec edx
mov dword [esp + 0x34], 0xffffffff
push edx
push eax
push ecx
lea ecx, [esp + 0x28]
call dword [0x4964a4]
mov eax, dword [eax + 4]
test eax, eax
jne 0x40855f
mov eax, dword [0x4964d8]
lea edx, [esp + 0x34]
push edx
push 0x4bf774
push eax
call dword [0x4965e8]
add esp, 0xc
lea ecx, [esp + 0xb8]
push 1
call dword [0x4964c4]
mov al, byte [esp + 0x1b]
push 0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x5c], al
call dword [0x4964c4]
mov edi, 0x4ca954
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
lea ecx, [esp + 0x5c]
push ebx
call dword [0x496490]
test al, al
je 0x4085e1
mov edi, dword [esp + 0x5c]
mov ecx, ebx
mov edx, ecx
mov esi, 0x4ca954
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x30]
mov dword [esp + 0x60], ebx
mov byte [eax + ebx], 0
xor ebx, ebx
mov byte [esp + 0xe8], 4
cmp ebp, ebx
je 0x408631
push ebp
lea ecx, [esp + 0x7c]
push ebx
push ecx
lea ecx, [esp + 0x28]
call dword [0x4964a4]
mov edx, dword [0x4964a8]
mov byte [esp + 0xe8], 5
mov ecx, dword [edx]
push ecx
push ebx
push eax
lea ecx, [esp + 0x64]
call dword [0x49648c]
push 1
lea ecx, [esp + 0x7c]
mov byte [esp + 0xec], 4
call dword [0x4964c4]
lea edx, [esp + 0x58]
push 0x4ca954
push edx
call dword [0x496498]
mov edi, dword [esp + 0xf8]
add esp, 8
test al, al
je 0x4086ed
mov ecx, edi
call fcn.00487180
cmp eax, 7
jne 0x408a2d
lea eax, [esp + 0x58]
mov ecx, edi
push eax
call fcn.00488bf0
test al, al
je 0x408a53
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x4086ed
mov ecx, dword [esp + 0x50]
sub ecx, eax
mov eax, dword [esp + 0x2c]
sar ecx, 4
cmp eax, ecx
jae 0x4086ed
push ebx
lea ecx, [esp + 0x8c]
call fcn.00486810
sub esp, 0x18
lea eax, [esp + 0xa0]
mov edx, esp
mov dword [esp + 0x48], esp
lea ecx, [esp + 0x70]
push eax
push ecx
push edx
mov ecx, edi
mov byte [esp + 0x10c], 6
call fcn.00488b80
mov ecx, edi
call fcn.00487070
lea ecx, [esp + 0x88]
mov byte [esp + 0xe8], 4
call fcn.00486f00
jmp 0x4086ed
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0xf0]
xor ebx, ebx
mov ecx, edi
call fcn.00487180
cmp eax, 6
jne 0x408a9f
mov ecx, edi
call fcn.00487f80
mov ecx, dword [esp + 0x34]
dec eax
cmp ecx, eax
ja 0x408a79
push ebx
lea ecx, [esp + 0xa4]
call fcn.00486810
mov ecx, dword [esp + 0x34]
sub esp, 0x18
lea eax, [esp + 0xb8]
mov edx, esp
mov dword [esp + 0x48], esp
push eax
push ecx
push edx
mov ecx, edi
mov byte [esp + 0x10c], 7
call fcn.004888e0
mov ecx, edi
call fcn.00487070
lea ecx, [esp + 0xa0]
mov byte [esp + 0xe8], 4
call fcn.00486f00
mov edx, dword [0x4964a8]
inc esi
lea ecx, [esp + 0x38]
mov eax, dword [edx]
push eax
push esi
push ecx
lea ecx, [esp + 0x28]
call dword [0x4964a4]
mov edx, dword [0x4964a8]
mov byte [esp + 0xe8], 8
mov ecx, dword [edx]
push ecx
push ebx
push eax
lea ecx, [esp + 0x28]
call dword [0x49648c]
mov eax, dword [esp + 0x3c]
mov byte [esp + 0xe8], 4
cmp eax, ebx
je 0x4087c3
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4087ba
cmp al, 0xff
je 0x4087ba
dec al
mov byte [ecx], al
jmp 0x4087c3
push ecx
call fcn.0049213e
add esp, 4
mov esi, dword [esp + 0x24]
mov dword [esp + 0x3c], ebx
cmp esi, ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov byte [esp + 0x13], 0x5b
jbe 0x40882c
cmp esi, 1
jb 0x40882c
mov edi, dword [esp + 0x20]
mov ebp, dword [0x4965ec]
push esi
push 0x5b
push edi
call ebp
add esp, 0xc
cmp eax, ebx
je 0x408818
mov cl, byte [eax]
lea edx, [esp + 0x13]
cmp cl, byte [edx]
je 0x40881e
sub edi, eax
lea esi, [esi + edi - 1]
lea edi, [eax + 1]
push esi
push 0x5b
push edi
call ebp
add esp, 0xc
cmp eax, ebx
jne 0x4087f8
mov esi, dword [esp + 0x24]
jmp 0x408832
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
sub eax, edi
mov ebx, eax
jmp 0x40883e
mov ebp, dword [0x4965ec]
mov edx, dword [0x4964a8]
mov edi, dword [esp + 0x20]
mov ebx, dword [edx]
test esi, esi
mov byte [esp + 0x13], 0x5d
jbe 0x408879
cmp esi, 1
jb 0x408879
push esi
push 0x5d
push edi
call ebp
add esp, 0xc
test eax, eax
je 0x408879
mov dl, byte [eax]
lea ecx, [esp + 0x13]
cmp dl, byte [ecx]
je 0x4088db
sub edi, eax
lea esi, [esi + edi - 1]
lea edi, [eax + 1]
push esi
push 0x5d
push edi
call ebp
add esp, 0xc
test eax, eax
jne 0x408859
mov eax, dword [0x4964a8]
mov esi, dword [eax]
mov ecx, esi
lea edx, [ebx + 1]
sub ecx, ebx
lea eax, [esp + 0x68]
dec ecx
mov dword [esp + 0x30], esi
push ecx
push edx
push eax
lea ecx, [esp + 0x28]
call dword [0x4964a4]
mov eax, dword [eax + 4]
xor edi, edi
cmp eax, edi
jne 0x4088ab
mov eax, dword [0x4964d8]
lea ecx, [esp + 0x34]
push ecx
push 0x4bf774
push eax
call dword [0x4965e8]
mov eax, dword [esp + 0x78]
add esp, 0xc
cmp eax, edi
je 0x4088ec
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4088e3
cmp al, 0xff
je 0x4088e3
dec al
mov byte [ecx], al
jmp 0x4088ec
sub eax, dword [esp + 0x20]
mov esi, eax
jmp 0x408880
push ecx
call fcn.0049213e
add esp, 4
cmp ebx, 0xffffffff
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
je 0x408908
cmp esi, 0xffffffff
jne 0x4086e0
xor edi, edi
mov eax, dword [esp + 0x5c]
cmp eax, edi
je 0x40892d
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x408924
cmp al, 0xff
je 0x408924
dec al
mov byte [ecx], al
jmp 0x40892d
push ecx
call fcn.0049213e
add esp, 4
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x5c], edi
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
xor edi, edi
jmp 0x4089dc
mov esi, dword [esp + 0xf0]
mov ecx, esi
call fcn.00487180
cmp eax, 7
jne 0x408ac5
lea edx, [esp + 0x1c]
mov ecx, esi
push edx
call fcn.00488bf0
test al, al
je 0x408aeb
mov eax, dword [esp + 0x4c]
xor edi, edi
cmp eax, edi
je 0x4089dc
mov ecx, dword [esp + 0x50]
sub ecx, eax
sar ecx, 4
cmp ebx, ecx
jae 0x4089dc
push edi
lea ecx, [esp + 0xcc]
call fcn.00486810
sub esp, 0x18
lea eax, [esp + 0xe0]
mov edx, esp
mov dword [esp + 0x44], esp
lea ecx, [esp + 0x34]
push eax
push ecx
push edx
mov ecx, esi
mov byte [esp + 0x10c], 9
call fcn.00488b80
mov ecx, esi
call fcn.00487070
lea ecx, [esp + 0xc8]
mov byte [esp + 0xe8], 3
call fcn.00486f00
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x20]
mov byte [esp + 0xe8], 2
cmp ecx, edi
je 0x408a0c
mov al, byte [ecx - 1]
test al, al
je 0x4089fe
cmp al, 0xff
je 0x4089fe
dec al
mov byte [ecx - 1], al
jmp 0x408a08
dec ecx
push ecx
call fcn.0049213e
add esp, 4
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x14]
inc ebx
add ecx, 0x10
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x14], ecx
jmp 0x408492
lea edx, [esp + 0x14]
lea ecx, [esp + 0x38]
push edx
mov dword [esp + 0x18], 0x4bf760
call dword [0x4965f0]
lea eax, [esp + 0x38]
push 0x4ba2e8
push eax
call fcn.004926ac
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x4bf754
push ecx
lea ecx, [esp + 0x3c]
call dword [0x4965f0]
lea edx, [esp + 0x38]
push 0x4ba2e8
push edx
call fcn.004926ac
lea eax, [esp + 0x14]
lea ecx, [esp + 0x38]
push eax
mov dword [esp + 0x18], 0x4bf744
call dword [0x4965f0]
lea ecx, [esp + 0x38]
push 0x4ba2e8
push ecx
call fcn.004926ac
lea edx, [esp + 0x14]
lea ecx, [esp + 0x38]
push edx
mov dword [esp + 0x18], 0x4bf734
call dword [0x4965f0]
lea eax, [esp + 0x38]
push 0x4ba2e8
push eax
call fcn.004926ac
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0x4bf734
push ecx
lea ecx, [esp + 0x3c]
call dword [0x4965f0]
lea edx, [esp + 0x38]
push 0x4ba2e8
push edx
call fcn.004926ac
lea eax, [esp + 0x14]
lea ecx, [esp + 0x38]
push eax
mov dword [esp + 0x18], 0x4bf754
call dword [0x4965f0]
lea ecx, [esp + 0x38]
push 0x4ba2e8
push ecx
call fcn.004926ac
cmp eax, edi
mov byte [esp + 0xe8], 0
mov esi, eax
je 0x408b34
push 1
mov ecx, esi
call dword [0x4964c4]
add esi, 0x10
cmp esi, edi
jne 0x408b1f
mov eax, dword [esp + 0x4c]
push eax
call fcn.0049213e
mov ecx, dword [esp + 0xfc]
xor eax, eax
add esp, 4
cmp ecx, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
je 0x408b72
mov al, byte [ecx - 1]
test al, al
je 0x408b68
cmp al, 0xff
je 0x408b68
dec al
mov byte [ecx - 1], al
jmp 0x408b72
dec ecx
push ecx
call fcn.0049213e
add esp, 4
mov ecx, dword [esp + 0xe0]
pop edi
pop esi
pop ebp
mov al, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0xdc
ret 0x14