Function at 0x509390
Capabilities:
Enumerate pe sections

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0x90
push ebp
mov ebp, dword [esp + 0x9c]
push edi
mov edi, dword [esp + 0xa8]
push eax
push ecx
mov ecx, dword [esp + 0xbc]
lea eax, [esp + 0x4c]
push edx
mov edx, dword [esp + 0xbc]
push eax
push ecx
push edx
push ebp
push edi
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x5093e6
pop edi
mov eax, 1
pop ebp
add esp, 0x90
ret
mov edx, dword [esp + 0x60]
push ebx
mov ebx, dword [esp + 0x5c]
mov eax, dword [esp + 0x68]
sub edx, ebx
mov ebx, dword [edi + 8]
mov ecx, dword [esp + 0x60]
push esi
mov esi, dword [ebp + 8]
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x54]
sub eax, ecx
imul ecx, dword [esp + 0x14]
imul ebx, esi
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x50]
mov dword [esp + 0x28], edx
lea ebx, [ebx + esi*4]
add ebx, dword [ebp + 4]
mov ebp, dword [esp + 0x60]
lea ebp, [ecx + ebp*4]
mov ecx, dword [edi + 4]
add ebp, ecx
mov cl, byte [esp + 0x4c]
test cl, cl
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebp
je 0x50978f
mov edi, dword [esp + 0x58]
mov ecx, edx
and ecx, 7
sub esi, edi
mov edi, dword [esp + 0x1c]
add esi, ecx
sar edx, 3
lea esi, [edi + esi*4]
mov edi, dword [esp + 0x28]
mov dword [esp + 0x30], esi
mov esi, ecx
sub esi, edi
mov edi, dword [esp + 0x14]
test eax, eax
lea esi, [edi + esi*4]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x2c], esi
jle 0x5098e9
mov dword [esp + 0x1c], eax
test edx, edx
jle 0x5096d0
lea esi, [ebp + 6]
lea edi, [ebx + 6]
mov dword [esp + 0x14], edx
push ebx
mov ecx, ebp
call fcn.0051eb50
movzx dx, byte [edi - 2]
movzx ax, byte [esi - 2]
lea ecx, [esi - 2]
sub eax, edx
cmp ax, 0xff
jbe 0x5094b7
xor eax, eax
movzx dx, byte [edi - 1]
movzx bp, byte [esi - 1]
sub ebp, edx
cmp bp, 0xff
jbe 0x5094cc
xor ebp, ebp
movzx dx, byte [esi]
movzx bx, byte [edi]
sub edx, ebx
cmp dx, 0xff
jbe 0x5094df
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 2]
movzx ax, byte [esi + 2]
lea ecx, [esi + 2]
sub eax, edx
cmp ax, 0xff
jbe 0x5094fe
xor eax, eax
movzx dx, byte [edi + 3]
movzx bp, byte [esi + 3]
sub ebp, edx
cmp bp, 0xff
jbe 0x509513
xor ebp, ebp
movzx bx, byte [edi + 4]
movzx dx, byte [esi + 4]
sub edx, ebx
cmp dx, 0xff
jbe 0x509528
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 6]
movzx ax, byte [esi + 6]
lea ecx, [esi + 6]
sub eax, edx
cmp ax, 0xff
jbe 0x509547
xor eax, eax
movzx dx, byte [edi + 7]
movzx bp, byte [esi + 7]
sub ebp, edx
cmp bp, 0xff
jbe 0x50955c
xor ebp, ebp
movzx bx, byte [edi + 8]
movzx dx, byte [esi + 8]
sub edx, ebx
cmp dx, 0xff
jbe 0x509571
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 0xa]
movzx ax, byte [esi + 0xa]
lea ecx, [esi + 0xa]
sub eax, edx
cmp ax, 0xff
jbe 0x509590
xor eax, eax
movzx dx, byte [edi + 0xb]
movzx bp, byte [esi + 0xb]
sub ebp, edx
cmp bp, 0xff
jbe 0x5095a5
xor ebp, ebp
movzx bx, byte [edi + 0xc]
movzx dx, byte [esi + 0xc]
sub edx, ebx
cmp dx, 0xff
jbe 0x5095ba
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 0xe]
movzx ax, byte [esi + 0xe]
lea ecx, [esi + 0xe]
sub eax, edx
cmp ax, 0xff
jbe 0x5095d9
xor eax, eax
movzx dx, byte [edi + 0xf]
movzx bp, byte [esi + 0xf]
sub ebp, edx
cmp bp, 0xff
jbe 0x5095ee
xor ebp, ebp
movzx bx, byte [edi + 0x10]
movzx dx, byte [esi + 0x10]
sub edx, ebx
cmp dx, 0xff
jbe 0x509603
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 0x12]
movzx ax, byte [esi + 0x12]
lea ecx, [esi + 0x12]
sub eax, edx
cmp ax, 0xff
jbe 0x509622
xor eax, eax
movzx dx, byte [edi + 0x13]
movzx bp, byte [esi + 0x13]
sub ebp, edx
cmp bp, 0xff
jbe 0x509637
xor ebp, ebp
movzx bx, byte [edi + 0x14]
movzx dx, byte [esi + 0x14]
sub edx, ebx
cmp dx, 0xff
jbe 0x50964c
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
movzx dx, byte [edi + 0x16]
movzx ax, byte [esi + 0x16]
lea ecx, [esi + 0x16]
sub eax, edx
cmp ax, 0xff
jbe 0x50966b
xor eax, eax
movzx dx, byte [edi + 0x17]
movzx bp, byte [esi + 0x17]
sub ebp, edx
cmp bp, 0xff
jbe 0x509680
xor ebp, ebp
movzx bx, byte [edi + 0x18]
movzx dx, byte [esi + 0x18]
sub edx, ebx
cmp dx, 0xff
jbe 0x509695
xor edx, edx
push edx
push ebp
push eax
call fcn.004c4850
mov ebp, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add ebp, 0x20
add esi, 0x20
add ebx, 0x20
add edi, 0x20
dec eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
jne 0x509498
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test ecx, ecx
jle 0x50975f
mov edi, ebx
mov eax, ebx
sub edi, ebp
mov dword [esp + 0x10], eax
lea esi, [ebp + 1]
mov dword [esp + 0x28], edi
mov dword [esp + 0x14], ecx
jmp 0x5096f7
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x28]
movzx cx, byte [eax]
movzx dx, byte [esi - 1]
sub edx, ecx
cmp dx, 0xff
jbe 0x50970b
xor edx, edx
movzx cx, byte [edi + esi]
movzx di, byte [esi]
sub edi, ecx
cmp di, 0xff
jbe 0x50971f
xor edi, edi
movzx cx, byte [eax + 2]
movzx ax, byte [esi + 1]
sub eax, ecx
cmp ax, 0xff
jbe 0x509733
xor eax, eax
push eax
push edi
push edx
lea ecx, [esi - 1]
call fcn.004c4850
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
add edx, 4
add esi, 4
dec eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
jne 0x5096ef
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x1c]
add ebp, edi
add ebx, esi
dec eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x10], ebx
mov dword [esp + 0x1c], eax
jne 0x509486
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x90
ret
mov ecx, dword [esp + 0x8c]
mov esi, dword [esp + 0x80]
shl ecx, 2
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x84]
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x1c]
imul ecx, dword [esp + 0x9c]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x94]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x88]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x98]
mov dword [esp + 0x2c], esi
mov esi, dword [esp + 0x90]
test eax, eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], esi
jle 0x5098e9
lea esi, [ebp + 2]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
jmp 0x509808
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x30]
add eax, edi
mov dword [esp + 0x18], eax
js 0x50982c
mov ebp, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
add ebx, ebp
sub eax, edi
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], eax
mov ebp, dword [esp + 0x40]
mov dword [esp + 0x44], ebx
test edx, edx
jle 0x5098c6
mov eax, esi
mov esi, edx
jmp 0x509846
mov ebx, dword [esp + 0x10]
add ebp, dword [esp + 0x48]
js 0x509859
mov ecx, dword [esp + 0x34]
add ebx, 4
mov dword [esp + 0x10], ebx
sub ebp, ecx
mov ecx, dword [esp + 0x10]
movzx bx, byte [eax - 2]
movzx dx, byte [ecx]
sub ebx, edx
cmp bx, 0xff
jbe 0x509871
xor ebx, ebx
movzx di, byte [ecx + 1]
movzx dx, byte [eax - 1]
sub edx, edi
cmp dx, 0xff
jbe 0x509886
xor edx, edx
movzx di, byte [ecx + 2]
movzx cx, byte [eax]
sub ecx, edi
cmp cx, 0xff
jbe 0x50989a
xor ecx, ecx
mov edi, dword [esp + 0x10]
mov byte [eax], cl
mov ecx, dword [esp + 0x38]
mov byte [eax - 2], bl
mov byte [eax - 1], dl
mov byte [eax + 1], 0xff
add edi, ecx
add eax, 4
dec esi
mov dword [esp + 0x10], edi
jne 0x509842
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x14]
add eax, ecx
add esi, edi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
dec eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x20], eax
jne 0x509804
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0x90
ret