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

Disassembly:
sub esp, 0x58
push esi
mov esi, ecx
mov ecx, dword [esp + 0x60]
test ecx, ecx
je 0x511dd0
mov eax, dword [esi]
test eax, eax
je 0x511dd0
cmp dword [esi + 0x14], 1
jne 0x511b27
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x78]
push eax
mov eax, dword [esp + 0x80]
push eax
mov eax, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push eax
push edx
push ecx
call dword [0x562228]
pop esi
add esp, 0x58
ret 0x20
mov eax, dword [esi + 0xc]
push ebx
push ebp
push edi
lea edi, [eax*4]
mov dword [esp + 0x10], edi
imul edi, eax
push edi
call fcn.005458b1
mov ebx, dword [0x56219c]
add esp, 4
mov dword [esp + 0x48], eax
push eax
mov eax, dword [esi + 4]
push edi
push eax
call ebx
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x14]
cdq
idiv ecx
mov edi, eax
mov eax, dword [esi + 0x10]
cdq
idiv ecx
lea ebp, [edi*4]
mov ecx, dword [esi]
mov dword [esp + 0x60], ebp
imul ebp, edi
push ecx
mov dword [esp + 0x44], edi
mov dword [esp + 0x60], ebp
mov dword [esp + 0x2c], eax
call dword [0x562230]
mov edx, dword [esp + 0x28]
mov dword [esp + 0x64], eax
mov eax, dword [esi]
push edx
push edi
push eax
call dword [0x5620d8]
push ebp
mov dword [esp + 0x48], eax
call fcn.005458b1
mov ecx, dword [esp + 0x48]
add esp, 4
mov edi, eax
push edi
push ebp
push ecx
mov dword [esp + 0x5c], edi
call ebx
mov ebx, dword [esi + 0x14]
mov edx, dword [esp + 0x28]
mov esi, ebx
mov dword [esp + 0x34], ebx
imul esi, ebx
lea eax, [edx - 2]
mov dword [esp + 0x54], esi
cmp eax, 1
mov dword [esp + 0x24], 0
jle 0x511d44
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
add ecx, 0xfffffffe
mov dword [esp + 0x2c], ecx
mov ecx, ebx
imul ecx, dword [esp + 0x10]
dec eax
mov dword [esp + 0x58], ecx
mov dword [esp + 0x28], ecx
mov dword [esp + 0x40], eax
cmp dword [esp + 0x2c], 1
jle 0x511d21
mov eax, dword [esp + 0x10]
mov ecx, edx
mov edx, dword [esp + 0x28]
mov dword [esp + 0x38], ecx
neg eax
lea edx, [edx + ebx*4]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x2c]
dec edx
mov dword [esp + 0x3c], edx
jmp 0x511c39
mov eax, dword [esp + 0x4c]
xor ebp, ebp
mov dword [esp + 0x14], eax
test ebx, ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
jle 0x511ccf
mov dword [esp + 0x30], ebx
jmp 0x511c59
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x20]
lea edx, [ecx + eax]
mov eax, dword [esp + 0x14]
lea esi, [edx + 1]
lea ecx, [esi + eax - 4]
mov eax, edx
sub eax, esi
sub edx, esi
mov esi, ebx
lea edi, [eax + 2]
mov ebx, dword [esp + 0x18]
xor eax, eax
mov al, byte [edi + ecx]
add ecx, 4
add ebp, eax
xor eax, eax
mov al, byte [ecx - 4]
add ebx, eax
xor eax, eax
mov al, byte [edx + ecx - 4]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x1c]
add ebx, eax
dec esi
mov dword [esp + 0x1c], ebx
jne 0x511c7a
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x30]
add edx, ecx
dec eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x30], eax
jne 0x511c55
mov edi, dword [esp + 0x50]
mov ebx, dword [esp + 0x34]
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x38]
mov eax, ebp
add ecx, 4
cdq
idiv esi
mov dword [esp + 0x38], ecx
mov byte [ecx + edi - 2], al
mov eax, dword [esp + 0x18]
cdq
idiv esi
mov byte [ecx + edi - 3], al
mov eax, dword [esp + 0x1c]
cdq
idiv esi
mov edx, dword [esp + 0x20]
mov byte [ecx + edi - 4], al
lea eax, [ebx*4]
add edx, eax
mov eax, dword [esp + 0x3c]
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x3c], eax
jne 0x511c35
mov ecx, dword [esp + 0x58]
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x5c]
mov eax, dword [esp + 0x60]
add edx, eax
mov eax, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x40]
dec eax
mov dword [esp + 0x40], eax
jne 0x511c04
mov ebx, dword [esp + 0x44]
push edi
push ebp
push ebx
call dword [0x5621b8]
mov edx, dword [esp + 0x48]
push edx
call fcn.005458da
push edi
call fcn.005458da
mov esi, dword [esp + 0x6c]
mov edi, dword [0x5620fc]
add esp, 8
push ebx
push esi
call edi
mov ecx, dword [esp + 0x84]
mov edx, dword [esp + 0x80]
mov ebp, eax
mov eax, dword [esp + 0x88]
push eax
mov eax, dword [esp + 0x80]
push ecx
mov ecx, dword [esp + 0x80]
push edx
mov edx, dword [esp + 0x80]
push esi
push eax
mov eax, dword [esp + 0x84]
push ecx
mov ecx, dword [esp + 0x84]
push edx
push eax
push ecx
call dword [0x562228]
push ebp
push esi
call edi
push ebx
call dword [0x5620dc]
push esi
call dword [0x562184]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x58
ret 0x20