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

Disassembly:
sub esp, 0x5c
push ebx
push ebp
mov ebp, dword [esp + 0x68]
push esi
push edi
mov dword [esp + 0x14], 0xffffffff
mov eax, dword [ebp + 0x40]
mov ebx, dword [ebp + 0x38]
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x44]
mov dword [esp + 0x70], eax
mov eax, dword [esp + 0x74]
add ebx, eax
mov dword [esp + 0x10], ecx
mov edi, dword [edx + ebx*8]
mov ecx, dword [edx + ebx*8 + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x30], ecx
mov ecx, dword [edx + ebx*8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0xc]
mov edx, dword [edx + ebx*8 + 4]
mov dword [esp + 0x20], edx
mov edx, dword [ecx + ebx*8]
mov dword [esp + 0x3c], edx
mov edx, dword [ebp + 0x18]
mov ecx, dword [ecx + ebx*8 + 4]
mov esi, dword [edx + ebx*4]
mov dword [esp + 0x40], ecx
mov ecx, dword [ebp + 0x34]
cmp esi, 0x80000005
mov edx, dword [ecx + eax*8]
mov dword [esp + 0x24], edx
mov edx, dword [ebp + 0x30]
mov ecx, dword [ecx + eax*8 + 4]
mov dword [esp + 0x28], ecx
mov ecx, dword [edx + eax*8]
mov dword [esp + 0x34], ecx
mov eax, dword [edx + eax*8 + 4]
mov dword [esp + 0x38], eax
je 0x4082cb
cmp esi, 0x80000006
je 0x4082cb
cmp esi, 0x80000004
je 0x4082cb
cmp esi, 0x80000007
je 0x4082cb
cmp esi, 1
jne 0x40829a
mov eax, dword [ebp + 0x33208]
test eax, eax
jne 0x408218
mov al, byte [ebp + 0x23c]
test al, al
jne 0x408218
mov eax, dword [ebp + 0x33210]
mov ebp, dword [ebp + 0x33214]
mov edx, eax
and edx, ebp
cmp edx, 0xffffffff
je 0x4081d4
add edi, eax
mov eax, dword [esp + 0x30]
adc eax, ebp
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x2c]
add eax, edi
adc ecx, edx
push ecx
mov ecx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x84]
push eax
push ecx
call fcn.004dfa70
add esp, 0x14
test eax, eax
je 0x40864f
pop edi
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov esi, dword [esp + 0x1c]
push esi
push ebp
call fcn.00408660
add esp, 8
test eax, eax
je 0x40864f
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
mov ecx, dword [ebp + 0x48]
push edx
push esi
push eax
push edi
push ecx
push ebp
call fcn.00407ea0
add esp, 0x18
test eax, eax
je 0x40864f
mov al, byte [ebp + 0x23c]
test al, al
je 0x408267
mov edx, dword [ebp + 0x48]
push esi
push edx
push ebp
call fcn.004328c0
add esp, 0xc
mov ecx, dword [esp + 0x34]
mov esi, dword [ebp + 0x48]
mov edi, dword [esp + 0x24]
mov eax, ecx
add esi, edi
mov edi, dword [esp + 0x78]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
cmp esi, 2
jne 0x408647
mov edi, dword [esp + 0x78]
mov edx, ecx
xor eax, eax
mov dword [esp + 0x14], 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov eax, dword [esp + 0x1c]
push eax
push ebp
call fcn.00408660
add esp, 8
test eax, eax
je 0x40864f
mov edx, dword [ebp + 0x40]
lea ecx, [esp + 0x18]
xor eax, eax
push ecx
push eax
push ebx
push edx
call fcn.004eb1c0
add esp, 0x10
test eax, eax
je 0x40833b
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x78]
lea esi, [edx + eax]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x40]
push ebx
push ecx
call fcn.004eb360
add esp, 0xc
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
cmp esi, 0x80000005
jne 0x4084d4
lea edx, [esp + 0x44]
push edx
call fcn.00405b80
add esp, 4
test eax, eax
jne 0x40864f
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
mov edx, dword [ebp + 0x48]
push eax
push esi
push ecx
push edi
push edx
push ebp
call fcn.00407ea0
add esp, 0x18
test eax, eax
jne 0x408396
lea eax, [esp + 0x44]
push eax
call fcn.00407410
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov al, byte [ebp + 0x23c]
test al, al
je 0x4083ae
mov ecx, dword [ebp + 0x48]
push esi
push ecx
push ebp
call fcn.004328c0
add esp, 0xc
mov edx, dword [esp + 0x3c]
mov eax, dword [ebp + 0x40]
push edx
push eax
call fcn.004eb2b0
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40864f
mov ecx, dword [ebp + 0x48]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x70]
mov dword [esp + 0x44], ecx
mov ecx, dword [eax + edx*8 + 0x24]
lea edi, [eax + edx*8 + 0x24]
mov dword [esp + 0x50], ecx
mov eax, dword [ebp + 0x48]
mov edx, dword [esp + 0x44]
sub eax, edx
add eax, esi
mov dword [esp + 0x48], eax
jns 0x408401
mov dword [esp + 0x48], 0
jmp 0x408410
cmp eax, 0x8000
jbe 0x408410
mov dword [esp + 0x48], 0x8000
mov eax, dword [edi]
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x3c]
sub eax, edx
add eax, ecx
mov dword [esp + 0x54], eax
jns 0x40842e
mov dword [esp + 0x54], 0
jmp 0x40843d
cmp eax, 0x8000
jbe 0x40843d
mov dword [esp + 0x54], 0x8000
lea edx, [esp + 0x44]
push 0
push edx
call fcn.00405bd0
add esp, 8
test eax, eax
je 0x4083e6
cmp eax, 1
je 0x40849b
mov eax, dword [edi]
push eax
call fcn.004df7a0
lea ecx, [esp + 0x48]
mov dword [edi], 0
push ecx
call fcn.00407410
push 0x6878d8
push 0xaf0
call fcn.00506990
push eax
call fcn.004dcde0
mov eax, dword [esp + 0x28]
add esp, 0x14
mov dword [0x7f2fa4], 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
lea edx, [esp + 0x44]
push edx
call fcn.00407410
add esp, 4
test eax, eax
je 0x4084c9
mov eax, dword [edi]
push eax
call fcn.004df7a0
mov eax, dword [esp + 0x18]
add esp, 4
mov dword [edi], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret
mov ecx, dword [esp + 0x34]
mov esi, dword [edi]
jmp 0x40861a
cmp esi, 0x80000006
je 0x4084f0
cmp esi, 0x80000004
je 0x4084f0
cmp esi, 0x80000007
jne 0x408647
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
push edx
mov edx, dword [ebp + 0x48]
push eax
push ecx
push edi
push edx
push ebp
call fcn.00407ea0
add esp, 0x18
test eax, eax
je 0x40864f
mov al, byte [ebp + 0x23c]
test al, al
je 0x408531
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0x48]
push eax
push ecx
push ebp
call fcn.004328c0
add esp, 0xc
mov eax, dword [ebp + 0x48]
cmp byte [eax], 0x49
jne 0x408556
cmp byte [eax + 1], 0x53
jne 0x408556
cmp byte [eax + 2], 0x7a
jne 0x408556
mov byte [eax], 0x42
mov edx, dword [ebp + 0x48]
mov byte [edx + 1], 0x5a
mov eax, dword [ebp + 0x48]
mov byte [eax + 2], 0x68
mov edi, dword [esp + 0x3c]
mov ecx, dword [ebp + 0x40]
push edi
push ecx
call fcn.004eb2b0
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0x40864f
cmp esi, 0x80000006
mov dword [esp + 0x74], edi
jne 0x4085b7
mov ecx, dword [esp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x70]
push 0
push 0
push ecx
mov ecx, dword [eax + edx*8 + 0x24]
lea esi, [eax + edx*8 + 0x24]
mov edx, dword [ebp + 0x48]
lea eax, [esp + 0x80]
push edx
push eax
push ecx
call fcn.0050a8d0
add esp, 0x18
test eax, eax
jl 0x40864f
jmp 0x408614
cmp esi, 0x80000007
jne 0x4085eb
mov ecx, dword [esp + 0x1c]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x70]
push 0
push ecx
lea esi, [eax + edx*8 + 0x24]
mov edx, dword [ebp + 0x48]
push edx
push edi
mov eax, dword [esi]
push eax
call fcn.0051e0a0
add esp, 0x14
mov dword [esp + 0x74], eax
test eax, eax
jle 0x40864f
jmp 0x408614
mov edx, dword [esp + 0x70]
lea ecx, [eax + eax*4]
lea eax, [esp + 0x74]
lea esi, [edx + ecx*8 + 0x24]
mov edx, dword [ebp + 0x48]
push eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esi]
push ecx
push edi
push edx
push eax
call fcn.00401000
add esp, 0x14
test eax, eax
jl 0x40864f
mov ecx, dword [esp + 0x34]
mov esi, dword [esi]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x78]
add esi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor eax, eax
and ecx, 3
push eax
mov eax, dword [esp + 0x14]
push ebx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x40]
push eax
push ecx
call fcn.004eb330
add esp, 0x10
mov dword [esp + 0x14], 0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5c
ret