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

Disassembly:
sub esp, 0x320
push ebx
mov ebx, dword [esp + 0x328]
push ebp
xor ebp, ebp
mov eax, dword [ebx + 0x2b8]
push esi
mov esi, dword [ebx + 0x14]
cmp eax, ebp
push edi
mov dword [esp + 0x2c], 0xffffffff
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x1c], ebp
jne 0x40956a
lea eax, [esp + 0x60]
push esi
push eax
call fcn.004078d0
add esp, 8
test eax, eax
jne 0x408e46
mov ecx, dword [esp + 0x344]
mov edx, dword [esp + 0x340]
mov eax, dword [esp + 0x33c]
push ecx
mov ecx, dword [esp + 0x33c]
push edx
push eax
push ecx
push ebx
call fcn.004085a0
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x320
ret
call fcn.00406bc0
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x40956a
mov edx, dword [esp + 0x338]
mov ecx, dword [esp + 0x33c]
mov dword [eax + 0x33210], edx
mov edx, dword [esp + 0x340]
mov dword [eax + 0x33214], ecx
mov ecx, dword [esp + 0x344]
mov dword [eax + 0x33218], edx
mov dword [eax + 0x44], esi
mov dword [eax + 0x50], 0x800
mov dword [eax + 0x54], ebp
mov dword [eax + 0x3321c], ecx
mov edx, dword [esp + 0x138]
or edx, dword [esp + 0x13c]
je 0x4090db
mov eax, dword [esp + 0x140]
mov edx, dword [esp + 0x144]
mov ecx, eax
or ecx, edx
je 0x4090db
inc eax
push eax
call fcn.004b6a20
add esp, 4
cmp eax, ebp
mov dword [esp + 0x28], eax
je 0x40956a
mov edx, dword [esp + 0x140]
mov eax, dword [esp + 0x13c]
mov ecx, dword [esp + 0x138]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push esi
call fcn.004b6c50
add esp, 0x14
test eax, eax
je 0x40956a
mov ebp, dword [esp + 0x28]
push 0x54a430
push ebp
call fcn.004f6040
mov esi, eax
push 0x54a414
push esi
call fcn.004f6040
mov ebx, eax
sub ebx, esi
lea eax, [ebx + 1]
push eax
call fcn.004b6a20
mov ecx, ebx
mov edi, eax
mov edx, ecx
push 0x54a3e8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
mov dword [esp + 0x64], eax
rep movsb byte es:[edi], byte [esi]
mov byte [ebx + eax], 0
call fcn.004f6040
add esp, 0x1c
test eax, eax
je 0x409561
mov eax, dword [esp + 0x140]
mov ecx, ebp
push 0x54a400
lea edx, [eax + ecx - 0x14]
push edx
call fcn.004f6040
add esp, 8
test eax, eax
je 0x409561
mov edi, 0x54a420
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], ecx
xor edi, edi
push 0x54a420
push edx
call fcn.004f6040
mov esi, eax
add esp, 8
test esi, esi
je 0x40925a
mov eax, dword [esp + 0x24]
push 0x54a428
add esi, eax
push esi
mov dword [esp + 0x38], esi
call fcn.004f6040
add esp, 8
test eax, eax
je 0x40925a
mov ecx, dword [esp + 0x1c]
sub eax, esi
mov dword [esp + 0x10], edi
mov ebp, eax
mov eax, dword [esp + 0x20]
add edi, 0xd0
inc ecx
push edi
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], edi
call fcn.004f5eff
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x409561
lea ecx, [ebp + 1]
push ecx
call fcn.004b6a20
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x409561
mov ecx, ebp
mov edi, ebx
mov edx, ecx
mov byte [ebx + ebp], 0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call fcn.00408b60
lea eax, [esp + 0x64]
mov edi, ebx
push eax
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebx
call fcn.00408be0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x28]
lea esi, [edx + ecx]
push esi
push ebx
call fcn.004081d0
mov eax, dword [esi]
add esp, 0x20
cmp eax, 0x6d697368
jne 0x40925a
mov eax, dword [esi + 0xc8]
lea eax, [eax + eax*4]
shl eax, 3
push eax
call fcn.004b6a20
add esp, 4
mov dword [esi + 0xcc], eax
test eax, eax
je 0x409561
mov esi, dword [esi + 0xc8]
mov edi, eax
push ebx
lea ecx, [esi + esi*4]
lea esi, [ebx + 0xcc]
shl ecx, 3
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.004b6a50
mov edi, dword [esp + 0x18]
mov edx, dword [esp + 0x34]
add esp, 4
jmp 0x408fa5
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x8c]
or eax, ecx
je 0x40956a
mov eax, dword [esp + 0x90]
mov edx, dword [esp + 0x94]
mov ecx, eax
or ecx, edx
je 0x40956a
push eax
xor edi, edi
call fcn.004b6a20
add esp, 4
cmp eax, ebp
mov dword [esp + 0x28], eax
je 0x40956a
mov edx, dword [esp + 0x90]
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
push edx
mov edx, dword [esp + 0x2c]
push eax
push ecx
push edx
push esi
call fcn.004b6c50
add esp, 0x14
test eax, eax
je 0x40956a
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], ebp
lea ecx, [eax + 0x104]
mov ebx, dword [esp + 0x28]
add ecx, edi
mov esi, dword [esp + 0x94]
mov eax, ecx
sub eax, ebx
mov dword [esp + 0x24], ecx
add eax, 0xcc
cdq
cmp edx, esi
ja 0x40925a
jb 0x40918e
cmp eax, dword [esp + 0x90]
ja 0x40925a
lea edx, [esp + 0x260]
push edx
push ecx
call fcn.004081d0
mov eax, dword [esp + 0x268]
add esp, 8
cmp eax, 0x6d697368
jne 0x40925a
mov eax, dword [esp + 0x328]
mov edx, dword [esp + 0x20]
mov esi, ebp
add ebp, 0xd0
lea eax, [eax + eax*4]
push ebp
push edx
lea ecx, [eax*8 + 0xd0]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
call fcn.004f5eff
add esp, 8
mov dword [esp + 0x20], eax
test eax, eax
je 0x409561
lea ebx, [esi + eax]
mov ecx, 0x34
lea esi, [esp + 0x260]
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x328]
lea ecx, [eax + eax*4]
shl ecx, 3
push ecx
call fcn.004b6a20
add esp, 4
mov dword [ebx + 0xcc], eax
test eax, eax
je 0x409561
mov ecx, dword [esp + 0x328]
mov edx, dword [esp + 0x24]
mov edi, eax
lea ecx, [ecx + ecx*4]
lea esi, [edx + 0xcc]
shl ecx, 3
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x30]
mov ecx, edx
jmp 0x40915c
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor eax, eax
mov dword [ecx + 0x2c], edx
mov ecx, dword [esp + 0x78]
mov edi, dword [esp + 0x7c]
mov dword [esp + 0x40], ecx
test edx, edx
mov dword [esp + 0x44], edi
mov ebx, ecx
mov esi, edi
mov dword [esp + 0x10], eax
jle 0x40954c
jmp 0x409291
mov edi, dword [esp + 0x7c]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x80]
sub edx, ecx
mov ecx, dword [esp + 0x84]
sbb ecx, edi
cmp esi, ecx
ja 0x40954c
jb 0x4092b5
cmp ebx, edx
jae 0x40954c
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x30], edx
lea edx, [eax + eax*2]
mov dword [esp + 0x34], ecx
xor edi, edi
lea ecx, [eax + edx*4]
mov edx, dword [esp + 0x20]
shl ecx, 4
mov dword [esp + 0x2c], edi
lea ebp, [ecx + edx]
mov dword [esp + 0x24], ebp
jmp 0x4092ed
mov ebp, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 0xc8]
lea ecx, [ecx + ecx*4]
shl ecx, 3
cmp edi, ecx
jae 0x40953b
mov ecx, dword [ebp + 0xcc]
mov edx, edi
add edx, ecx
push edx
call fcn.00407870
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xcc]
lea ecx, [edi + eax + 4]
push ecx
call fcn.00407870
mov edx, dword [ebp + 0xcc]
lea eax, [edi + edx + 8]
push eax
call fcn.004078a0
add esp, 0xc
push 0
push 0x200
push edx
push eax
call fcn.004f5ce0
mov ebx, dword [esp + 0x24]
mov esi, dword [esp + 0x2c]
mov ebp, edx
mov edi, eax
mov ecx, dword [ebx + 0xcc]
lea edx, [esi + ecx + 0x10]
push edx
call fcn.004078a0
add esp, 4
push 0
push 0x200
push edx
push eax
call fcn.004f5ce0
mov dword [esp + 0x38], eax
mov eax, dword [ebx + 0xcc]
mov dword [esp + 0x3c], edx
lea ecx, [esi + eax + 0x18]
push ecx
call fcn.004078a0
mov ecx, dword [esp + 0x30]
mov esi, edx
mov edx, dword [esp + 0x28]
mov ebx, eax
mov dword [esp + 0x58], ebx
mov eax, dword [edx + 0xcc]
lea edx, [ecx + eax + 0x20]
push edx
call fcn.004078a0
mov ecx, dword [esp + 0x1c]
add esp, 8
cmp ecx, 0xffffffff
je 0x4093eb
mov ebx, dword [esp + 0x30]
mov ecx, eax
add ecx, ebx
mov ebx, dword [esp + 0x34]
mov dword [esp + 0x4c], ecx
mov ecx, edx
adc ecx, ebx
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x4c]
add ecx, ebx
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x50]
adc ecx, esi
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x14]
cmp ecx, 0x80000005
jne 0x409419
mov ecx, dword [esp + 0x3c]
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x44]
push ecx
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x4c]
add edx, ebx
adc eax, esi
push eax
push edx
push 0x80000005
jmp 0x409505
cmp ecx, 1
jne 0x409441
mov ecx, dword [esp + 0x3c]
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x44]
push ecx
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x4c]
add edx, ebx
adc eax, esi
push eax
push edx
push 1
jmp 0x409505
cmp ecx, 2
je 0x4094e7
test ecx, ecx
je 0x4094e7
cmp ecx, 0x80000006
je 0x4094c8
cmp ecx, 0x80000004
je 0x4094c8
cmp ecx, 0x7ffffffe
je 0x409523
cmp ecx, 0xffffffff
jne 0x409523
mov edx, ebx
or edx, esi
jne 0x4094b6
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
inc eax
cmp edx, eax
jle 0x4094b6
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0x19c]
add edx, 0x18
push edx
call fcn.004078a0
add esp, 4
or eax, edx
je 0x40951f
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jmp 0x40951f
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
jmp 0x409523
push ebp
push edi
mov edi, dword [esp + 0x44]
push edi
mov edi, dword [esp + 0x44]
push edi
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x4c]
add edx, ebx
adc eax, esi
push eax
push edx
push ecx
jmp 0x409505
mov ecx, dword [esp + 0x3c]
push ebp
push edi
push ecx
mov ecx, dword [esp + 0x44]
push ecx
push edx
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x4c]
add edx, ebx
adc eax, esi
push eax
push edx
push 2
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x358]
push ecx
push edx
push eax
call fcn.00406c20
add esp, 0x30
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x2c]
add edx, 0x28
cmp ecx, 0xffffffff
mov dword [esp + 0x2c], edx
jne 0x4092e1
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x409289
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00406dd0
add esp, 4
mov dword [esp + 0x2c], 0
mov ebx, dword [esp + 0x334]
xor ebp, ebp
mov edi, dword [esp + 0x1c]
cmp edi, ebp
jle 0x409590
mov edx, dword [esp + 0x20]
lea esi, [edx + 0xcc]
mov eax, dword [esi]
push eax
call fcn.004b6a50
add esp, 4
add esi, 0xd0
dec edi
jne 0x40957c
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004b6a50
mov edx, dword [esp + 0x2c]
push edx
call fcn.004b6a50
mov eax, dword [esp + 0x50]
push eax
call fcn.004b6a50
mov esi, dword [esp + 0x38]
add esp, 0xc
cmp esi, ebp
jne 0x4095da
mov ecx, dword [esp + 0x18]
mov eax, esi
pop edi
pop esi
mov dword [ebx + 0x29c], 4
mov dword [ebx + 0x3a98], ecx
pop ebp
pop ebx
add esp, 0x320
ret
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x4095eb
push eax
call fcn.00406b50
add esp, 4
mov eax, esi
pop edi
mov dword [ebx + 0x3a98], ebp
pop esi
pop ebp
pop ebx
add esp, 0x320
ret