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

Disassembly:
sub esp, 0x290
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ecx, 0xa1
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esi + 0x910]
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x18], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x1c], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x20], ecx
lea ecx, [esi + 0x6ac]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x20]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x904]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x24], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x28], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x2c], ecx
lea ecx, [esi + 0x7c0]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x2c]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x8f8]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x30], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x34], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x38], ecx
lea ecx, [esi + 0x730]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x38]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x8ec]
mov dword [ecx + 8], edx
mov ecx, eax
mov ebx, eax
mov edx, dword [ecx]
mov dword [esp + 0x3c], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x40], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x44], ecx
lea ecx, [esi + 0x73c]
mov edi, ecx
mov ebp, dword [edi]
mov dword [ebx], ebp
mov ebp, dword [edi + 4]
mov edi, dword [edi + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x40]
mov dword [ebx + 4], ebp
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x44]
mov dword [ecx + 8], edx
lea ecx, [esi + 0x8e0]
mov edx, ecx
mov dword [ebx + 8], edi
mov edi, dword [edx]
mov dword [esp + 0x48], edi
mov ebx, dword [edx + 4]
mov dword [esp + 0x4c], ebx
mov edx, dword [edx + 8]
mov dword [esp + 0x50], edx
lea edx, [esi + 0x784]
mov ebx, edx
mov ebp, dword [ebx]
mov dword [ecx], ebp
mov ebp, dword [ebx + 4]
mov dword [ecx + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [edx], edi
mov dword [ecx + 8], ebx
mov ecx, dword [esp + 0x4c]
mov dword [edx + 4], ecx
mov ecx, dword [esp + 0x50]
mov dword [edx + 8], ecx
lea ecx, [esi + 0x8d4]
mov ebx, ecx
mov edx, dword [ebx]
mov dword [esp + 0x54], edx
mov edi, dword [ebx + 4]
mov dword [esp + 0x58], edi
mov ebx, dword [ebx + 8]
mov dword [esp + 0x5c], ebx
mov ebx, eax
mov ebp, dword [ebx]
mov dword [ecx], ebp
mov ebp, dword [ebx + 4]
mov dword [ecx + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [eax], edx
mov edx, dword [esp + 0x5c]
mov dword [eax + 4], edi
mov dword [eax + 8], edx
lea eax, [esi + 0x8c8]
mov dword [ecx + 8], ebx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x60], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x64], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x68], ecx
lea ecx, [esi + 0x844]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x68]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x8bc]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x6c], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x70], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x74], ecx
lea ecx, [esi + 0x850]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x74]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x8b0]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x78], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x7c], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x80], ecx
lea ecx, [esi + 0x6b8]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x80]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x7e4]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x84], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x88], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x8c], ecx
lea ecx, [esi + 0x6f4]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x8c]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x7f0]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x90], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0x94], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0x98], ecx
lea ecx, [esi + 0x778]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0x98]
mov dword [eax + 8], ebx
mov dword [ecx + 4], edi
lea eax, [esi + 0x76c]
mov dword [ecx + 8], edx
mov ecx, eax
mov edx, dword [ecx]
mov dword [esp + 0x9c], edx
mov edi, dword [ecx + 4]
mov dword [esp + 0xa0], edi
mov ecx, dword [ecx + 8]
mov dword [esp + 0xa4], ecx
lea ecx, [esi + 0x7d8]
mov ebx, ecx
mov ebp, dword [ebx]
mov dword [eax], ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 0x10], 5
mov dword [eax + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx], edx
mov edx, dword [esp + 0xa4]
mov dword [ecx + 4], edi
mov dword [eax + 8], ebx
mov dword [ecx + 8], edx
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 8
lea edi, [esp + 0x18]
lea ebx, [esi + 0x694]
mov dword [esp + 0x14], 0x36
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x36
idiv ecx
lea edx, [edx + edx*2]
lea eax, [esi + edx*4 + 0x694]
mov edx, edi
mov ecx, eax
mov ebp, dword [ecx]
mov dword [edx], ebp
mov ebp, dword [ecx + 4]
mov dword [edx + 4], ebp
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
mov edx, ebx
mov ecx, dword [edx]
mov dword [eax], ecx
mov ecx, dword [edx + 4]
mov dword [eax + 4], ecx
mov ecx, ebx
mov edx, dword [edx + 8]
add ebx, 0xc
mov dword [eax + 8], edx
mov eax, edi
add edi, 0xc
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov eax, dword [eax + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jne 0x409d63
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x409d3f
xor ebp, ebp
lea ecx, [esi + 0xa10]
lea eax, [esi + 0x698]
lea edx, [esi + 0x920]
lea edi, [esi + 0xb00]
mov dword [esp + 0x10], 0x33
cmp ebp, 3
jl 0x409dfe
xor ebp, ebp
mov ebx, ebp
sub ebx, 0
je 0x409e51
dec ebx
je 0x409e2e
dec ebx
jne 0x409e72
mov ebx, dword [eax - 4]
mov dword [edi - 4], ebx
mov bx, word [eax]
mov word [edi], bx
mov bx, word [eax + 2]
mov word [edi + 4], bx
xor ebx, ebx
mov word [edi + 2], bx
mov word [edi + 6], bx
add edi, 0xc
jmp 0x409e72
mov ebx, dword [eax - 4]
mov dword [edx - 4], ebx
mov bx, word [eax]
mov word [edx], bx
mov bx, word [eax + 2]
mov word [edx + 4], bx
xor ebx, ebx
mov word [edx + 2], bx
mov word [edx + 6], bx
add edx, 0xc
jmp 0x409e72
mov ebx, dword [eax - 4]
mov dword [ecx - 4], ebx
mov bx, word [eax]
mov word [ecx], bx
mov bx, word [eax + 2]
mov word [ecx + 4], bx
xor ebx, ebx
mov word [ecx + 2], bx
mov word [ecx + 6], bx
add ecx, 0xc
mov ebx, dword [esp + 0x10]
inc ebp
add eax, 0xc
dec ebx
mov dword [esp + 0x10], ebx
jne 0x409df7
mov edi, 1
lea eax, [esi + 0x922]
mov dword [esp + 0x14], edi
cmp edi, 0x11
jge 0x409ffd
mov edx, 0x11
lea ecx, [eax + 6]
sub edx, edi
mov dword [esp + 0x10], edx
cmp word [eax], 0x11
jg 0x409efb
mov dx, word [eax - 2]
cmp dx, word [ecx + 4]
jge 0x409efb
lea edx, [esi + 0x444]
lea edi, [eax - 6]
mov ebx, edx
mov ebp, dword [edi]
mov dword [ebx], ebp
mov ebp, dword [edi + 4]
mov dword [ebx + 4], ebp
mov edi, dword [edi + 8]
mov dword [ebx + 8], edi
mov edi, ecx
mov ebx, dword [edi]
mov dword [eax - 6], ebx
mov ebx, dword [edi + 4]
mov dword [eax - 2], ebx
mov edi, dword [edi + 8]
mov dword [eax + 2], edi
mov ebx, dword [edx]
mov edi, ecx
mov dword [edi], ebx
mov ebx, dword [edx + 4]
mov dword [edi + 4], ebx
mov edx, dword [edx + 8]
mov dword [edi + 8], edx
cmp word [eax + 0xf0], 0x11
jg 0x409f71
mov dx, word [eax + 0xee]
cmp dx, word [ecx + 0xf4]
jge 0x409f71
lea edx, [esi + 0x444]
lea edi, [eax + 0xea]
mov ebx, edx
mov ebp, dword [edi]
mov dword [ebx], ebp
mov ebp, dword [edi + 4]
mov dword [ebx + 4], ebp
mov edi, dword [edi + 8]
mov dword [ebx + 8], edi
lea edi, [ecx + 0xf0]
mov ebx, dword [ecx + 0xf0]
mov dword [eax + 0xea], ebx
mov ebx, dword [edi + 4]
mov dword [eax + 0xee], ebx
mov edi, dword [edi + 8]
mov dword [eax + 0xf2], edi
mov edi, dword [edx]
mov dword [ecx + 0xf0], edi
mov edi, dword [edx + 4]
mov dword [ecx + 0xf4], edi
mov edx, dword [edx + 8]
mov dword [ecx + 0xf8], edx
cmp word [eax + 0x1e0], 0x11
jg 0x409fe7
mov dx, word [eax + 0x1de]
cmp dx, word [ecx + 0x1e4]
jge 0x409fe7
lea edx, [esi + 0x444]
lea edi, [eax + 0x1da]
mov ebx, edx
mov ebp, dword [edi]
mov dword [ebx], ebp
mov ebp, dword [edi + 4]
mov dword [ebx + 4], ebp
mov edi, dword [edi + 8]
mov dword [ebx + 8], edi
lea edi, [ecx + 0x1e0]
mov ebx, dword [ecx + 0x1e0]
mov dword [eax + 0x1da], ebx
mov ebx, dword [edi + 4]
mov dword [eax + 0x1de], ebx
mov edi, dword [edi + 8]
mov dword [eax + 0x1e2], edi
mov edi, dword [edx]
mov dword [ecx + 0x1e0], edi
mov edi, dword [edx + 4]
mov dword [ecx + 0x1e4], edi
mov edx, dword [edx + 8]
mov dword [ecx + 0x1e8], edx
mov edx, dword [esp + 0x10]
add ecx, 0xc
dec edx
mov dword [esp + 0x10], edx
jne 0x409eab
mov edi, dword [esp + 0x14]
inc edi
add eax, 0xc
mov dword [esp + 0x14], edi
lea ecx, [edi - 1]
cmp ecx, 0x10
jl 0x409e94
lea edi, [esi + 0x634]
push 0
push 1
lea edx, [esi + 0xa0c]
mov eax, 0x11
push edi
push edx
mov ecx, esi
mov dword [esi + 0x638], eax
mov dword [esi + 0x63c], eax
call fcn.0040bc50
mov ebp, 2
push 0
push ebp
lea eax, [esi + 0xafc]
push edi
push eax
mov ecx, esi
call fcn.0040bc50
xor edi, edi
jmp 0x40a05b
mov ebp, 2
lea ecx, [edi + edi*2]
lea ecx, [esi + ecx*4]
mov edx, dword [ecx + 0x91c]
lea eax, [ecx + 0x91c]
cmp edx, 0x97
je 0x40a130
cmp edx, dword [ecx + 0x928]
jne 0x40a130
cmp edx, dword [ecx + 0x934]
jne 0x40a130
cmp edx, dword [ecx + 0x940]
jne 0x40a130
lea ebx, [esi + 0xacc]
mov edx, 0x10
mov ecx, ebx
cmp word [ecx + 0xa], bp
jne 0x40a0b8
cmp dword [ecx], 0x95
jl 0x40a0e5
dec edx
sub ecx, 0xc
test edx, edx
jge 0x40a0aa
cmp edi, 0x11
jge 0x40a130
mov edx, 0x10
mov ecx, ebx
cmp word [ecx + 0xa], 0
jne 0x40a0db
cmp dword [ecx], 0x95
jl 0x40a0e5
dec edx
sub ecx, 0xc
test edx, edx
jge 0x40a0cc
jmp 0x40a130
lea ecx, [esi + 0x444]
mov edi, eax
mov ebx, ecx
lea edx, [edx + edx*2]
mov ebp, dword [edi]
mov dword [ebx], ebp
lea edx, [esi + edx*4 + 0xa0c]
mov ebp, dword [edi + 4]
mov dword [ebx + 4], ebp
mov edi, dword [edi + 8]
mov dword [ebx + 8], edi
mov edi, edx
mov ebx, dword [edi]
mov dword [eax], ebx
mov ebx, dword [edi + 4]
mov dword [eax + 4], ebx
mov edi, dword [edi + 8]
mov dword [eax + 8], edi
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ecx + 4]
mov dword [edx + 4], eax
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
mov edi, 0x12
inc edi
cmp edi, 0x11
jl 0x40a056
push 0
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
add esp, 8
lea edi, [esi + 0x444]
mov dword [esp + 0x14], 0x11
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x11
idiv ecx
lea edx, [edx + edx*2]
lea ecx, [esi + edx*4]
mov edx, edi
mov dword [esp + 0x10], ecx
add ecx, 0x91c
mov eax, ecx
mov ebx, dword [eax]
mov dword [edx], ebx
mov ebx, dword [eax + 4]
mov dword [edx + 4], ebx
mov eax, dword [eax + 8]
mov dword [edx + 8], eax
lea eax, [edi + 0x5c8]
lea edx, [eax - 0xf0]
mov ebx, edx
mov ebp, dword [ebx]
mov dword [ecx], ebp
mov ebp, dword [ebx + 4]
mov dword [ecx + 4], ebp
mov ebx, dword [ebx + 8]
mov dword [ecx + 8], ebx
mov ecx, edi
mov ebx, dword [ecx]
mov dword [edx], ebx
mov ebx, dword [ecx + 4]
mov dword [edx + 4], ebx
mov ebx, edi
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
mov edx, dword [esp + 0x10]
lea ecx, [edx + 0xa0c]
mov edx, ecx
mov ebp, dword [edx]
mov dword [ebx], ebp
mov ebp, dword [edx + 4]
mov dword [ebx + 4], ebp
mov edx, dword [edx + 8]
mov dword [ebx + 8], edx
mov edx, eax
mov ebx, dword [edx]
mov dword [ecx], ebx
mov ebx, dword [edx + 4]
mov dword [ecx + 4], ebx
mov edx, dword [edx + 8]
mov dword [ecx + 8], edx
mov ecx, edi
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x10]
mov ecx, dword [ecx + 8]
mov dword [eax + 8], ecx
lea eax, [edx + 0xafc]
mov ecx, eax
mov edx, edi
mov ebx, dword [ecx]
mov dword [edx], ebx
mov ebx, dword [ecx + 4]
mov dword [edx + 4], ebx
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
lea ecx, [edi + 0x6b8]
mov edx, ecx
mov ebx, dword [edx]
mov dword [eax], ebx
mov ebx, dword [edx + 4]
mov dword [eax + 4], ebx
mov edx, dword [edx + 8]
mov dword [eax + 8], edx
mov eax, edi
mov edx, dword [eax]
mov dword [ecx], edx
mov edx, dword [eax + 4]
mov dword [ecx + 4], edx
mov eax, dword [eax + 8]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x14]
add edi, 0xc
dec eax
mov dword [esp + 0x14], eax
jne 0x40a15a
lea eax, [esi + 0xa16]
mov ecx, 0x11
xor edx, edx
mov word [eax - 0xf0], dx
mov word [eax], dx
mov word [eax + 0xf0], dx
add eax, 0xc
dec ecx
jne 0x40a265
add esi, 0x670
mov eax, 3
mov ecx, dword [esi + 0x288]
mov dword [esi], ecx
mov dx, word [esi + 0x28c]
mov word [esi + 4], dx
mov cx, word [esi + 0x28e]
mov word [esi + 6], cx
add esi, 0xc
dec eax
jne 0x40a287
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x290
ret