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

Disassembly:
sub esp, 8
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x14]
push edi
xor edi, edi
mov eax, dword [esi]
add ebx, edx
cmp ecx, edi
mov dword [esp + 0x10], eax
mov dword [esi + 0x34], 0xbdf20da3
mov dword [esp + 0x20], ebx
jl 0x418937
mov cl, byte [eax + 0x1e]
test cl, cl
jne 0x418937
mov eax, dword [esi + 0x1c]
push ebp
mov ebp, dword [esi + 4]
lea eax, [eax + eax*4]
lea ecx, [ebp + eax*4]
mov eax, dword [esi + 0x20]
mov dword [esp + 0x1c], ecx
lea edx, [eax + eax*4]
lea eax, [esp + 0x2c]
push eax
push esi
lea ebp, [ebp + edx*4]
call fcn.00418980
mov eax, dword [esp + 0x38]
mov cl, byte [esp + 0x3c]
add esp, 8
cmp eax, edi
mov byte [esi + 0x68], cl
je 0x4187a8
cmp ebx, 0xa
jge 0x4187a8
mov dword [esp + 0x24], 0xa
mov ebx, dword [esp + 0x24]
mov edi, dword [esp + 0x1c]
mov ecx, ebp
sub ecx, edi
xor eax, eax
mov edx, ecx
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 + 0x1c]
lea edi, [ebx + ebx*4]
mov ebx, dword [esp + 0x20]
mov ecx, eax
and ecx, 7
add eax, ecx
lea ebx, [ebx + ebx*4]
shl edi, 3
mov dword [esp + 0x1c], eax
shl ebx, 3
mov ecx, dword [esi + 8]
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x20]
push ebp
push eax
push edi
push ecx
mov dword [esp + 0x24], 0
call fcn.00418a50
mov ecx, dword [esi + 0x48]
lea edx, [esp + 0x24]
mov dword [esi + 8], eax
push edx
lea eax, [esp + 0x34]
push ebp
push eax
push ebx
push ecx
call fcn.00418a50
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x38]
mov dword [esi + 0x48], eax
push edx
lea eax, [esp + 0x48]
push ebp
push eax
mov eax, dword [esi + 0xc]
lea edx, [ecx*4]
push edx
push eax
call fcn.00418a50
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x4c]
lea edx, [esp + 0x58]
push ecx
mov ecx, dword [esi + 0x4c]
push ebp
push edx
shl eax, 2
push eax
push ecx
call fcn.00418a50
mov ecx, dword [esp + 0x78]
add esp, 0x50
lea edx, [esp + 0x10]
mov dword [esi + 0x4c], eax
push edx
mov edx, dword [esi + 0x44]
lea eax, [esp + 0x20]
push ebp
push eax
lea eax, [ecx*4]
push eax
push edx
call fcn.00418a50
mov dword [esi + 0x44], eax
mov eax, dword [esp + 0x24]
add esp, 0x14
test eax, eax
je 0x4188a2
push eax
mov eax, dword [esp + 0x18]
push eax
call fcn.0040d420
mov dword [esi + 0xa4], eax
mov eax, dword [esp + 0x18]
add esp, 8
mov ecx, dword [esi + 0xa4]
test eax, eax
mov dword [esp + 0x1c], ecx
lea ebp, [eax + ecx]
je 0x4188c2
mov ecx, dword [esp + 0x14]
mov al, byte [ecx + 0x1e]
test al, al
je 0x4187df
mov eax, dword [esi + 0x48]
mov dx, word [esp + 0x28]
test eax, eax
mov word [esi + 0x32], dx
pop ebp
je 0x4188fb
mov ecx, dword [esp + 0x1c]
test ecx, ecx
mov word [esi + 0x50], cx
jle 0x4188fb
xor eax, eax
mov edx, dword [esi + 0x48]
mov edi, dword [esp + 0x10]
mov word [edx + eax + 0x1c], 1
mov edx, dword [esi + 0x48]
mov dword [edx + eax], edi
add eax, 0x28
dec ecx
jne 0x4188e1
mov eax, dword [esi + 8]
test eax, eax
je 0x418935
mov ecx, dword [esp + 0x20]
mov edx, 1
add eax, 0xffffffd8
cmp ecx, edx
mov dword [esi + 8], eax
mov dword [esi + 0x18], ecx
jl 0x418935
mov eax, 0x28
mov edi, dword [esi + 8]
mov ebx, dword [esp + 0x10]
mov word [edi + eax + 0x1c], dx
mov edi, dword [esi + 8]
mov dword [edi + eax], ebx
add eax, 0x28
dec ecx
jne 0x41891d
xor edi, edi
mov al, byte [esp + 0x2c]
mov cl, byte [esi + 0x62]
or cl, al
mov dword [esi + 0x90], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x6c], edi
mov dword [esi + 0x78], edi
mov dword [esi + 0x94], edi
mov dword [esi + 0x58], 0xffffffff
mov byte [esi + 0x60], 2
mov byte [esi + 0x62], cl
mov dword [esi + 0x34], 0xbdf20da3
mov dword [esi + 0x54], 1
mov byte [esi + 0x66], 0xff
pop edi
pop esi
pop ebx
add esp, 8
ret