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

Disassembly:
mov edx, dword [esp + 0x20]
mov dword [esp + 0x10], edx
test edi, edi
je 0x478473
mov ecx, dword [esp + 0x2c]
lea ecx, [edi + ecx*4]
cmp edi, ecx
jae 0x478473
sub ecx, edi
dec ecx
shr ecx, 2
inc ecx
or eax, 0xffffffff
rep stosd dword es:[edi], eax
cmp dword [esp + 0x3c], 0
mov eax, dword [esp + 0xbc]
je 0x4784ea
mov ecx, esi
cmp esi, eax
jae 0x4784e4
cmp dword [esp + 0x70], 0
je 0x4784b7
mov edx, dword [esp + 0x70]
push edx
mov edx, dword [esp + 0xc0]
lea esi, [esp + 0x78]
call fcn.00478cb0
mov esi, dword [esp + 0x10]
add esp, 4
test eax, eax
jne 0x4784e4
mov eax, dword [esp + 0xbc]
jmp 0x4784df
mov edi, dword [esp + 0x74]
mov edx, eax
sub edx, edi
cmp ecx, edx
ja 0x4784df
mov dl, byte [ecx]
cmp dl, byte [esp + 0x84]
jne 0x4784df
cmp edi, 1
je 0x4784e4
mov dl, byte [ecx + 1]
cmp dl, byte [esp + 0x85]
je 0x4784e4
inc ecx
cmp ecx, eax
jb 0x478487
mov edx, ecx
mov dword [esp + 0x20], edx
cmp dword [esp + 0x40], 0
jne 0x478647
cmp dword [esp + 0x14], 0
jl 0x478557
cmp dword [esp + 0x54], 0
je 0x478532
cmp esi, edx
jae 0x478647
jmp 0x478510
movzx eax, byte [esi]
mov ecx, dword [esp + 0x88]
movzx eax, byte [eax + ecx]
cmp eax, dword [esp + 0x14]
je 0x478643
inc esi
cmp esi, edx
jb 0x478510
jmp 0x478643
cmp esi, edx
jae 0x478647
lea ebx, [ebx]
movzx ecx, byte [esi]
cmp ecx, dword [esp + 0x14]
je 0x478643
inc esi
cmp esi, edx
jb 0x478540
jmp 0x478643
cmp dword [esp + 0x34], 0
je 0x478616
mov ecx, dword [esp + 0xb8]
add ecx, dword [ebp + 0x14]
cmp esi, ecx
jbe 0x478647
cmp esi, edx
jae 0x4785f6
lea esp, [esp]
cmp dword [esp + 0x70], 0
je 0x4785ba
cmp esi, dword [esp + 0xb8]
jbe 0x4785ed
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x74]
invalid
test eax, eax
je 0x4787b6
mov edx, dword [esp + 0xbc]
cmp esi, edx
jae 0x4787e3
mov ecx, dword [esp + 0xc]
push eax
lea esi, [esp + 0x78]
call fcn.00478cb0
add esp, 4
test eax, eax
jne 0x478845
mov eax, dword [esp + 0x70]
jmp 0x4787e3
mov ecx, dword [esp + 0xbc]
sub ecx, dword [esp + 0x74]
cmp esi, ecx
ja 0x4787e3
mov dl, byte [esp + 0x84]
cmp byte [esi], dl
jne 0x4787e3
cmp dword [esp + 0x74], 1
je 0x478845
mov cl, byte [esp + 0x85]
cmp byte [esi + 1], cl
je 0x478845
mov dword [esp + 0xc], ebx
cmp dword [esp + 0x44], edi
jne 0x478845
cmp ebx, dword [esp + 0x10]
ja 0x478845
cmp byte [ebx - 1], 0xd
jne 0x478824
cmp ebx, dword [esp + 0x10]
jae 0x478824
cmp byte [ebx], 0xa
jne 0x478824
mov edx, dword [esp + 0x18]
test byte [edx + 0xc], 0x20
jne 0x478824
cmp eax, 1
je 0x47881f
cmp eax, 2
je 0x47881f
cmp dword [esp + 0x74], 2
jne 0x478824
inc ebx
mov dword [esp + 0xc], ebx
mov esi, dword [esp + 0xc]
mov dword [esp + 0xec], edi
mov edi, dword [esp + 0x64]
jmp 0x478450
cmp dword [esp + 0x30], 0
je 0x47885a
mov eax, dword [esp + 0x64]
push eax
call dword [0x49d2d4]
add esp, 4
test edi, edi
je 0x47886c
cmp edi, 0xfffffff4
je 0x47886c
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4788a2
cmp dword [ebp + 0x20], 1
mov dword [esp + 0xec], 0
jle 0x478898
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
sub eax, edx
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
sub eax, edx
mov dword [ecx + 4], eax
mov eax, 0xfffffff4
jmp 0x478937
or eax, 0xffffffff
jmp 0x478937
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x47895b
test byte [ecx], 0x20
je 0x47895b
mov ecx, dword [ecx + 0x18]
mov edx, dword [esp + 0xec]
mov dword [ecx], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret