Function at 0x499950
Capabilities:
Enumerate pe sections
Read file on windows

Disassembly:
push ecx
push ebx
push ebp
mov ebp, dword [esp + 0x14]
mov ebx, ebp
imul ebx, dword [esp + 0x18]
test ebx, ebx
push edi
mov edi, dword [esp + 0x20]
mov ecx, edi
mov dword [esp + 0xc], ecx
jg 0x499974
pop edi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push esi
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 4]
test al, 0x40
je 0x499b21
test eax, 0x40000
je 0x4999ad
mov al, byte [esi + 0x40]
mov byte [edi], al
and dword [esi + 4], 0xfffbffff
add dword [esi + 0x24], 1
add edi, 1
sub ebx, 1
mov dword [esp + 0x10], edi
je 0x499bba
mov ecx, edi
mov eax, dword [esi + 0x24]
mov edi, dword [esi + 0x28]
mov edx, dword [esi + 0x30]
sub edi, eax
add edx, eax
cmp ebx, edi
jg 0x499a1a
push ebx
push edx
push ecx
call fcn.00424270
add esp, 0xc
add dword [esi + 0x24], ebx
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
cmp ecx, 1
jle 0x499bba
test dword [esi + 4], 0x20000
je 0x499bba
cmp ecx, 2
mov eax, edi
jne 0x499b42
sub ebp, 1
js 0x499bba
mov edi, edi
mov cl, byte [eax]
mov dl, byte [eax + 1]
mov byte [eax], dl
mov byte [eax + 1], cl
add eax, 2
sub ebp, 1
jns 0x499a00
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
push edi
push edx
push ecx
call fcn.00424270
mov ebp, 0x2000
mov eax, dword [esi + 0x18]
add dword [esp + 0x1c], edi
add esp, 0xc
sub ebx, edi
test eax, eax
je 0x499a50
mov ecx, dword [esi + 0x30]
push ebp
push ecx
push eax
call fcn.004fba10
add esp, 0xc
jmp 0x499ad1
mov eax, dword [esi + 0x1c]
cmp dword [eax + 4], 0
jbe 0x499a83
mov edx, dword [esi + 0x30]
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x1c]
mov dword [eax + 0x10], ebp
mov ecx, dword [esi + 0x1c]
push 2
push ecx
call fcn.004f9c50
add esp, 8
test eax, eax
jne 0x499abc
mov eax, dword [esi + 0x1c]
mov edi, ebp
sub edi, dword [eax + 0x10]
test edi, edi
jg 0x499ad7
mov edi, dword [esi + 0x2c]
test edi, edi
jle 0x499a93
sub edi, dword [eax + 8]
je 0x499ad3
cmp edi, ebp
jle 0x499a95
mov edi, ebp
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x34]
push edx
push edi
push 1
push eax
call fcn.00501672
add esp, 0x10
test eax, eax
jle 0x499af8
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x34]
mov dword [ecx], edx
mov ecx, dword [esi + 0x1c]
mov dword [ecx + 4], eax
jmp 0x499a50
push eax
push 0x54a3b4
push 1
push 0x7dd
call fcn.00442f20
add esp, 0x10
mov edi, eax
test edi, edi
jle 0x499af8
mov edx, dword [esi + 0x28]
add dword [esi + 0x20], edx
cmp edi, ebx
mov eax, dword [esi + 0x30]
mov ecx, dword [esp + 0x10]
jge 0x499b07
push edi
push eax
push ecx
call fcn.00424270
mov dword [esi + 0x28], edi
jmp 0x499a27
mov edx, dword [esi + 0x28]
mov dword [esi + 0x24], edx
pop esi
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
push ebx
push eax
push ecx
call fcn.00424270
mov ebp, dword [esp + 0x28]
add esp, 0xc
mov dword [esi + 0x28], edi
mov dword [esi + 0x24], ebx
jmp 0x4999cc
mov edx, dword [esi + 0x14]
push edx
push ebx
push 1
push edi
call fcn.00501672
add esp, 0x10
cmp eax, ebx
jae 0x4999d0
pop esi
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret
cmp ecx, 4
jne 0x499b78
sub ebp, 1
js 0x499bba
lea eax, [edi + 1]
nop
movzx edx, byte [eax + 2]
mov cl, byte [eax - 1]
mov byte [eax - 1], dl
movzx edx, byte [eax + 1]
mov byte [eax + 2], cl
mov cl, byte [eax]
mov byte [eax], dl
mov byte [eax + 1], cl
add eax, 4
sub ebp, 1
jns 0x499b50
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
sub ebp, 1
js 0x499bba
lea eax, [edi + 1]
movzx edx, byte [eax + 6]
mov cl, byte [eax - 1]
mov byte [eax - 1], dl
movzx edx, byte [eax + 5]
mov byte [eax + 6], cl
mov cl, byte [eax]
mov byte [eax], dl
movzx edx, byte [eax + 4]
mov byte [eax + 5], cl
mov cl, byte [eax + 1]
mov byte [eax + 1], dl
movzx edx, byte [eax + 3]
mov byte [eax + 4], cl
mov cl, byte [eax + 2]
mov byte [eax + 2], dl
mov byte [eax + 3], cl
add eax, 8
sub ebp, 1
jns 0x499b80
pop esi
pop edi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret