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

Disassembly:
mov eax, dword [esp + 0x2c]
cmp ebx, dword [esp + 0x7c]
jg 0x47692f
cmp edi, eax
jl 0x4766fd
mov eax, dword [esp + 0x10]
cmp edi, eax
mov edi, dword [esp + 0x24]
jge 0x476607
mov ecx, eax
mov eax, dword [esp + 0x38]
sub edi, ecx
add edi, eax
push edi
mov ecx, esi
mov dword [esp + 0x18], ebx
call fcn.00475573
push eax
push ebx
mov ecx, esi
call fcn.00475733
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x74]
mov dword [esp + 0x20], eax
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x1d0]
push edx
push eax
mov dword [esp + 0x24], ebp
call dword [0x4794a0]
mov edx, dword [esp + 0x1d0]
mov ecx, dword [esp + 0x1cc]
mov eax, dword [esp + 0x1d4]
mov dword [esp + 0x1e0], edx
mov dword [esp + 0x1dc], ecx
mov ecx, dword [esp + 0x1d8]
lea edx, [esp + 0x1dc]
mov dword [esp + 0x1e4], eax
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0xc0]
call 0x4b99e7
mov edx, dword [esp + 0x2c]
lea eax, [edx - 1]
cmp edi, eax
jne 0x476822
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jl 0x476819
mov edx, dword [esp + 0xc4]
mov eax, 1
lea ecx, [esp + 0x30]
push eax
push ecx
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
call dword [0x4790f4]
lea eax, [esp + 0x138]
lea ecx, [esp + 0xbc]
push eax
call 0x4b99e7
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
push ebx
lea edx, [esp + 0x22c]
and al, 0x2c
add al, byte [eax]
add byte [ecx + 0x52], dl
lea ecx, [esp + 0xc8]
call 0x4b9ed8
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x3c]
push edx
push eax
lea ecx, [esp + 0xc4]
call 0x4b9f24
lea ecx, [esp + 0x110]
push ecx
lea ecx, [esp + 0xc0]
call 0x4b99e7
push ebx
lea edx, [esp + 0x23c]
push ebp
push edx
lea ecx, [esp + 0xc8]
call 0x4b9ed8
push ebp
push ebp
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov eax, dword [esp + 0x3c]
push ebp
push eax
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov ecx, dword [esp + 0x3c]
push ebx
push ecx
lea ecx, [esp + 0xc4]
call 0x4b9f24
push ebx
push ebp
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov ebx, dword [esp + 0x3c]
jmp 0x47691e
mov ecx, dword [esp + 0x10]
mov eax, edi
cmp edi, ecx
jge 0x476834
sub eax, ecx
mov ecx, dword [esp + 0x38]
cmp byte [ebx], al
invalid
push eax
mov ecx, esi
call fcn.00475573
push eax
push ebx
mov ecx, esi
call fcn.00475733
out dx, al
out dx, al
invalid
dec dword [ebx + 0x24448bf8]
je 0x476887
clc
jl 0x476918
mov eax, dword [esp + 0xc4]
lea edx, [esp + 0x30]
push 1
push edx
push eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebp
call dword [0x4790f0]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0xc4]
inc ecx
push 1
mov dword [esp + 0x34], ecx
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [0x4790f4]
lea eax, [esp + 0x138]
lea ecx, [esp + 0xbc]
push eax
call 0x4b99e7
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
push ecx
lea eax, [esp + 0x244]
push edx
push eax
lea ecx, [esp + 0xc8]
call 0x4b9ed8
mov ecx, dword [esp + 0x30]
push ebp
push ecx
lea ecx, [esp + 0xc4]
call 0x4b9f24
lea edx, [esp + 0x110]
lea ecx, [esp + 0xbc]
push edx
call 0x4b99e7
push ebp
push edi
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0xbc]
push eax
push edi
call 0x4b9f24
mov ecx, dword [esp + 0x40]
push ecx
push ebx
lea ecx, [esp + 0xc4]
call 0x4b9f24
mov ebx, edi
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x44]
inc edi
cmp edi, eax
mov dword [esp + 0x24], edi
jl 0x4765db
mov edx, dword [esp + 0x74]
mov eax, dword [esp + 0x3c]
cmp edx, eax
jg 0x476c0f
mov ebx, dword [esp + 0x28]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x40]
sub ebx, ecx
cmp ebx, eax
mov dword [esp + 0x24], ebx
jge 0x476c0f
jmp 0x476965
cmp edi, dword [esp + 0x80]
jg 0x476c0f
mov eax, dword [esp + 0x28]
cmp ebx, eax
jge 0x476982
sub ebx, eax
mov eax, dword [esp + 0x58]
add ebx, eax
push ebx
mov ecx, esi
invalid