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

Disassembly:
sub esp, 0xe0
mov eax, dword [0x5fd0b0]
xor eax, esp
push ebx
mov ebx, dword [esp + 0xf0]
push ebp
mov ebp, dword [esp + 0xf0]
mov cl, byte [ebp + 4]
push esi
mov esi, dword [esp + 0xf0]
mov dword [esp + 0xe8], eax
mov eax, dword [esp + 0xfc]
and cl, 3
cmp cl, 3
push edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x20], eax
jne 0x511af9
lea edx, [esp + 0x4c]
push edx
push 0x5d262c
push ebp
call fcn.0046e6f0
mov edx, dword [esp + 0x58]
lea eax, [esp + 0x58]
push eax
push 0x10
lea ecx, [esp + 0x64]
push ecx
push 2
push edx
mov eax, ecx
push eax
call fcn.004713a0
mov ecx, 0xa
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x74]
push edx
call fcn.00512f20
mov esi, dword [esp + 0x44]
add esp, 0x2c
dec esi
test esi, esi
jle 0x511af9
lea ebx, [ebx]
push ebx
push ebp
push ebx
push ebx
call fcn.00470d10
lea eax, [esp + 0x24]
push eax
dec esi
lea ecx, [esp + 0x60]
push esi
push ecx
call fcn.00512ed0
mov eax, dword [esp + 0x30]
add esp, 0x1c
test eax, eax
je 0x511af5
mov edx, dword [esp + 0x10]
push ebx
push ebp
push edx
push ebx
call fcn.00470d10
add esp, 0x10
test esi, esi
jg 0x511ac0
mov al, byte [ebp + 4]
and al, 7
cmp al, 5
jne 0x511c87
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x28]
push edx
push ebp
mov dword [esp + 0x30], 1
mov word [esp + 0x34], 5
call fcn.00512050
mov edx, dword [esp + 0x58]
lea eax, [esp + 0x58]
push eax
push 0x10
lea ecx, [esp + 0x64]
push ecx
push 3
push edx
mov eax, ecx
push eax
call fcn.004713a0
mov esi, dword [esp + 0x34]
mov ecx, 0xa
lea edi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x74]
push edx
call fcn.00512f20
mov esi, dword [esp + 0x44]
add esp, 0x2c
dec esi
test esi, esi
jle 0x511bb7
lea ebx, [ebx]
lea eax, [esp + 0x24]
push eax
push ebp
mov ecx, eax
push ecx
mov edx, eax
push edx
call fcn.00470d10
lea eax, [esp + 0x24]
push eax
dec esi
lea ecx, [esp + 0x60]
push esi
push ecx
call fcn.00512ed0
mov eax, dword [esp + 0x30]
add esp, 0x1c
test eax, eax
je 0x511bb3
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x24]
push edx
push ebp
push eax
mov ecx, edx
push ecx
call fcn.00470d10
add esp, 0x10
test esi, esi
jg 0x511b70
mov edx, dword [esp + 0x10]
push ebx
push ebp
push edx
lea eax, [esp + 0x30]
push eax
call fcn.00470d10
lea ecx, [esp + 0x34]
push ecx
push ebp
mov edx, ecx
push ebx
push edx
call fcn.00470d10
mov esi, dword [esp + 0x40]
push esi
lea eax, [esp + 0x48]
push 0x5d9b48
push eax
call fcn.0046e910
mov eax, dword [esi]
add esp, 0x2c
cmp eax, 1
je 0x511c87
push ebx
push ebp
lea ecx, [esp + 0x2c]
push ecx
push ebx
mov dword [esp + 0x34], 1
mov word [esp + 0x38], 2
call fcn.00470d10
mov esi, dword [esp + 0x28]
add esp, 0x10
dec esi
test esi, esi
jle 0x511c66
lea edx, [esp + 0x24]
push edx
push ebp
mov eax, edx
push eax
mov ecx, edx
push ecx
call fcn.00470d10
lea edx, [esp + 0x24]
push edx
dec esi
lea eax, [esp + 0x60]
push esi
push eax
call fcn.00512ed0
mov eax, dword [esp + 0x30]
add esp, 0x1c
test eax, eax
je 0x511c62
lea ecx, [esp + 0x24]
push ecx
push ebp
mov edx, ecx
push edx
mov eax, ecx
push eax
call fcn.00470cc0
add esp, 0x10
test esi, esi
jg 0x511c21
lea ecx, [esp + 0x24]
push ecx
push ebp
mov edx, ecx
push edx
mov eax, ecx
push eax
call fcn.00470d10
push ebx
push ebp
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.00470d10
add esp, 0x20
mov dl, byte [ebp + 4]
and dl, 7
cmp dl, 1
jne 0x512007
lea eax, [esp + 0x4c]
push eax
push 0x5d262c
push ebp
call fcn.00512050
add esp, 0xc
xor esi, esi
mov dword [esp + 0x1c], esi
nop
test byte [esp + 0x50], 1
jne 0x511cde
mov eax, dword [esp + 0x4c]
lea ecx, [esp + 0x4c]
push ecx
push 0x10
lea edx, [esp + 0x58]
push edx
push 1
push eax
mov ecx, edx
push ecx
call fcn.004713a0
add esp, 0x18
inc esi
cmp esi, 0x100
jl 0x511cb0
mov dword [esp + 0x1c], esi
mov ecx, 0xa
mov esi, 0x5d262c
lea edi, [esp + 0xc4]
rep movsd dword es:[edi], dword [esi]
lea edx, [esp + 0xc4]
push edx
mov eax, edx
push 0x5d262c
push eax
call fcn.0046e6f0
mov ecx, 0xa
lea esi, [esp + 0xd0]
lea edi, [esp + 0xa8]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x5c]
push edx
call fcn.00512f20
mov esi, dword [esp + 0x2c]
add esp, 0x14
dec esi
test esi, esi
jle 0x511d90
lea ebx, [ebx]
lea eax, [esp + 0x9c]
push eax
push ebp
mov ecx, eax
push ecx
mov edx, eax
push edx
call fcn.00470d10
lea eax, [esp + 0x24]
push eax
dec esi
lea ecx, [esp + 0x60]
push esi
push ecx
call fcn.00512ed0
mov eax, dword [esp + 0x30]
add esp, 0x1c
test eax, eax
je 0x511d8c
lea edx, [esp + 0x9c]
push edx
push ebp
lea eax, [esp + 0xcc]
push eax
mov ecx, edx
push ecx
call fcn.00470d10
add esp, 0x10
test esi, esi
jg 0x511d40
mov ecx, 0xa
lea esi, [esp + 0x9c]
lea edi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
dec esi
test esi, esi
jle 0x511dc7
jmp 0x511db0
lea edx, [esp + 0x74]
push edx
push ebp
mov eax, edx
push eax
mov ecx, edx
push ecx
call fcn.00470d10
add esp, 0x10
dec esi
jne 0x511db0
lea edx, [esp + 0x74]
push edx
push ebp
mov eax, edx
push 0x5d262c
push eax
call fcn.00470cc0
mov esi, dword [esp + 0x30]
push esi
lea ecx, [esp + 0x88]
push 0x5d3218
push ecx
call fcn.0046e910
mov eax, dword [esi]
add esp, 0x1c
cmp eax, 1
jne 0x511cf5
lea edx, [esp + 0x4c]
push edx
mov eax, edx
push 0x5d262c
push eax
call fcn.00512050
mov eax, dword [esp + 0x58]
lea ecx, [esp + 0x58]
push ecx
push 0x10
lea edx, [esp + 0x64]
push edx
push 1
push eax
mov ecx, edx
push ecx
call fcn.004713a0
mov esi, dword [esp + 0x34]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x74]
mov ecx, 0xa
mov edi, ebx
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00512f20
mov esi, dword [esp + 0x44]
add esp, 0x2c
dec esi
test esi, esi
jle 0x511e8d
push ebx
push ebp
push ebx
push ebx
call fcn.00470d10
lea ecx, [esp + 0x24]
push ecx
dec esi
lea edx, [esp + 0x60]
push esi
push edx
call fcn.00512ed0
mov eax, dword [esp + 0x30]
add esp, 0x1c
test eax, eax
je 0x511e89
mov eax, dword [esp + 0x10]
push ebx
push ebp
push eax
push ebx
call fcn.00470d10
add esp, 0x10
test esi, esi
jg 0x511e54
lea ecx, [esp + 0x24]
push ecx
push ebp
push ebx
push ebx
call fcn.00470d10
mov esi, dword [esp + 0x20]
lea edx, [esp + 0x34]
push edx
push ebp
mov eax, edx
push esi
push eax
call fcn.00470d10
push ebx
push ebp
push esi
push ebx
call fcn.00470d10
mov esi, dword [esp + 0x50]
push esi
lea ecx, [esp + 0x58]
push 0x5d9b48
push ecx
call fcn.0046e910
mov eax, dword [esi]
add esp, 0x3c
cmp eax, 1
je 0x51202e
jmp 0x511ee0
mov eax, dword [esp + 0x1c]
test eax, eax
mov ecx, 0xa
lea esi, [esp + 0x24]
lea edi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x10], 0
jg 0x511f10
mov esi, dword [esp + 0x20]
jmp 0x511f53
mov eax, dword [esp + 0x1c]
lea esp, [esp]
mov esi, dword [esp + 0x20]
cmp dword [esi], 1
je 0x511f53
lea edx, [esp + 0x74]
push edx
push ebp
mov eax, edx
push eax
mov ecx, edx
push ecx
call fcn.00470d10
push esi
lea edx, [esp + 0x88]
push 0x5d9b48
push edx
call fcn.0046e910
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
add esp, 0x1c
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x511f05
mov eax, ecx
mov edx, dword [esp + 0x10]
cmp edx, eax
je 0x511fff
sub eax, edx
dec eax
test eax, eax
mov ecx, 0xa
lea esi, [esp + 0x9c]
lea edi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
jle 0x511f97
mov esi, eax
lea ebx, [ebx]
lea eax, [esp + 0x74]
push eax
push ebp
mov ecx, eax
push ecx
mov edx, eax
push edx
call fcn.00470d10
add esp, 0x10
dec esi
jne 0x511f80
lea eax, [esp + 0x9c]
push eax
lea ecx, [esp + 0x78]
push ebp
push ecx
mov edx, ecx
push edx
call fcn.00470d10
mov eax, dword [esp + 0x20]
push ebx
push ebp
lea ecx, [esp + 0x8c]
push ecx
push ebx
mov dword [esp + 0x3c], eax
call fcn.00470d10
lea edx, [esp + 0x44]
push edx
push ebp
lea eax, [esp + 0xc4]
push eax
mov ecx, edx
push ecx
call fcn.00470d10
mov esi, dword [esp + 0x50]
push esi
lea edx, [esp + 0x58]
push 0x5d9b48
push edx
call fcn.0046e910
mov eax, dword [esi]
add esp, 0x3c
cmp eax, 1
jne 0x511ee0
jmp 0x51202e
mov dword [esi], 0
jmp 0x51202e
lea eax, [esp + 0x74]
push eax
push ebp
push ebx
push ebx
call fcn.00470d10
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push ecx
lea edx, [esp + 0x88]
push edx
push eax
call fcn.0046e910
add esp, 0x1c
mov ecx, dword [esp + 0xec]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0047209e
add esp, 0xe0
ret