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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x90
mov ebx, ecx
mov edi, dword [ebp + 8]
mov eax, dword [edi]
mov edx, dword [eax + 0x28]
mov ecx, dword [eax + 0x2c]
mov esi, edx
or esi, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], edx
je 0x4c2237
movzx esi, word [eax + 0x3a]
cmp esi, 0x40
jne 0x4c2258
mov dword [esp + 0x10], ebx
mov ebx, edx
add ebx, 0x40
mov esi, ecx
adc esi, 0
mov edi, 0xffffffbf
cmp edi, edx
mov edi, 0xffffffff
sbb edi, ecx
jb 0x4c22ac
mov edi, dword [ebp + 8]
mov edi, dword [edi + 4]
mov dword [esp + 0x54], edi
cmp edi, ebx
mov ebx, 0
sbb ebx, esi
jb 0x4c22ac
movzx ebx, word [eax + 0x3c]
add eax, edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 0
test ebx, ebx
mov edi, 0
jne 0x4c2303
mov ebx, dword [eax + 0x20]
mov edi, dword [eax + 0x24]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x28], ebx
test edi, 0xfc000000
je 0x4c2303
mov dword [esp + 0x34], str.invalid_number_of_sections_specified_in_the_NULL_sections_sh_size_field__
lea eax, [esp + 0x28]
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0xd03
lea eax, [esp + 0x34]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], 0x5564e0
mov word [esp + 0x24], 0x302
mov dword [esp], 0x1c
call sub.libc.dll_operator_new_unsigned_int_
mov edi, eax
call fcn.0054f3f2
mov dword [esp + 0x68], eax
mov dword [esp + 0x64], 3
movsd xmm0, qword [esp + 0x64]
jmp 0x4c239d
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
cmp eax, ecx
je 0x4c22ed
and byte [ebx + 8], 0xfe
sub ecx, eax
sar ecx, 6
mov dword [ebx], eax
mov dword [ebx + 4], ecx
jmp 0x4c23be
mov dword [esp + 0x14], str.invalid_e_shentsize_in_ELF_header:
mov dword [esp + 0x1c], esi
mov word [esp + 0x24], 0xa03
mov dword [esp], 0x1c
call sub.libc.dll_operator_new_unsigned_int_
mov edi, eax
call fcn.0054f3f2
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], 3
movsd xmm0, qword [esp + 0x34]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x14]
mov dword [esp], eax
mov ecx, edi
call fcn.0054f20c
sub esp, 0xc
jmp 0x4c23b8
mov dword [esp + 0x14], str.section_header_table_goes_past_the_end_of_the_file:_e_shoff__0x
lea eax, [esp + 0x48]
mov dword [esp + 0x1c], eax
mov word [esp + 0x24], 0xf03
mov dword [esp], 0x1c
call sub.libc.dll_operator_new_unsigned_int_
mov edi, eax
call fcn.0054f3f2
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], 3
movsd xmm0, qword [esp + 0x34]
jmp 0x4c239d
and byte [ebx + 8], 0xfe
mov dword [ebx], 0
mov dword [ebx + 4], 0
jmp 0x4c23be
shld edi, ebx, 6
mov esi, ebx
shl esi, 6
add esi, edx
adc edi, ecx
jae 0x4c23ca
mov dword [esp + 0x78], str.invalid_section_header_table_offset__e_shoff__0x
lea eax, [esp + 0x48]
mov dword [esp + 0x80], eax
mov word [esp + 0x88], 0xf03
lea eax, [esp + 0x78]
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], str.__or_invalid_number_of_sections_specified_in_the_first_section_headers_sh_size_field__0x
mov word [esp + 0x74], 0x302
lea eax, [esp + 0x64]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
mov dword [esp + 0x3c], eax
mov word [esp + 0x44], 0xf02
lea eax, [esp + 0x34]
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], 0x5564e0
mov word [esp + 0x24], 0x302
mov dword [esp], 0x1c
call sub.libc.dll_operator_new_unsigned_int_
mov edi, eax
call fcn.0054f3f2
mov dword [esp + 0x60], eax
mov dword [esp + 0x5c], 3
movsd xmm0, qword [esp + 0x5c]
movsd qword [esp + 4], xmm0
lea eax, [esp + 0x14]
mov dword [esp], eax
mov ecx, edi
call fcn.0054f20c
sub esp, 0xc
mov ebx, dword [esp + 0x10]
or byte [ebx + 8], 1
mov dword [ebx], edi
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 4
xor ecx, ecx
cmp dword [esp + 0x54], esi
sbb ecx, edi
jae 0x4c2407
mov dword [esp + 0x14], str.section_table_goes_past_the_end_of_file
mov word [esp + 0x24], 0x103
lea eax, [esp + 0x14]
mov dword [esp + 4], eax
lea eax, [esp + 0x58]
mov dword [esp], eax
call fcn.0041ba30
mov ebx, dword [esp + 0x10]
or byte [ebx + 8], 1
mov eax, dword [esp + 0x58]
mov dword [ebx], eax
jmp 0x4c23be
mov ecx, dword [esp + 0x10]
and byte [ecx + 8], 0xfe
mov dword [ecx], eax
mov dword [ecx + 4], ebx
mov ebx, ecx
jmp 0x4c23be