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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x124
mov eax, dword [0x6510e8]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push esi
push edi
mov edi, ecx
mov ebx, edx
mov eax, dword [edi + 0x74]
test al, 1
je 0x5455c7
mov edx, dword [ebp + 8]
test al, 6
je 0x5452b8
call fcn.00543dd0
test dword [edi + 0x78], 0x100000
mov ecx, edi
je 0x5455d1
push str.out_of_place
lea edx, [esp + 0x54]
call fcn.00539070
add esp, 4
lea edx, [esp + 0x50]
mov ecx, edi
call fcn.00538ff0
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.00581335
mov esp, ebp
pop ebp
ret
cmp edx, 0x20
je 0x5452d8
call fcn.00543dd0
test dword [edi + 0x78], 0x100000
mov ecx, edi
je 0x5455db
push str.invalid
jmp 0x54528c
mov eax, dword [edi + 0x5c]
test eax, eax
je 0x5455bd
push 0x20
lea ecx, [esp + 0x34]
push ecx
push edi
call eax
mov eax, dword [edi + 0x78]
lea edx, [esp + 0x3c]
add esp, 0xc
test dword [edi + 0x11c], 0x20000000
je 0x545311
and eax, 0x300
cmp eax, 0x300
je 0x54532e
jmp 0x545318
test eax, 0x800
jne 0x54532e
mov ecx, dword [edi + 0x138]
push 0x20
call fcn.0054d410
add esp, 4
mov dword [edi + 0x138], eax
xor edx, edx
mov ecx, edi
call fcn.00543dd0
test eax, eax
jne 0x5452a3
movzx ecx, byte [esp + 0x30]
or esi, 0xffffffff
movzx eax, byte [esp + 0x31]
movzx edx, byte [esp + 0x34]
shl ecx, 8
add ecx, eax
movzx eax, byte [esp + 0x32]
shl ecx, 8
add ecx, eax
movzx eax, byte [esp + 0x33]
shl ecx, 8
add ecx, eax
movzx eax, byte [esp + 0x35]
cmp ecx, 0x7fffffff
cmovbe esi, ecx
shl edx, 8
add edx, eax
mov ecx, dword [esp + 0x37]
movzx eax, byte [esp + 0x36]
shl edx, 8
add edx, eax
mov dword [esp + 0x28], esi
shl edx, 8
movzx eax, cl
add edx, eax
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
movzx edx, ch
mov ecx, dword [esp + 0x3b]
shl edx, 8
mov dword [esp + 0x2c], eax
movzx eax, byte [esp + 0x39]
add edx, eax
movzx eax, byte [esp + 0x3a]
shl edx, 8
add edx, eax
movzx eax, cl
shl edx, 8
add edx, eax
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
movzx edx, ch
mov ecx, dword [esp + 0x3f]
shl edx, 8
mov dword [esp + 0x10], eax
movzx eax, byte [esp + 0x3d]
add edx, eax
movzx eax, byte [esp + 0x3e]
shl edx, 8
add edx, eax
movzx eax, cl
shl edx, 8
add edx, eax
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
movzx edx, ch
mov ecx, dword [esp + 0x43]
shl edx, 8
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0x41]
add edx, eax
movzx eax, byte [esp + 0x42]
shl edx, 8
add edx, eax
movzx eax, cl
shl edx, 8
add edx, eax
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
movzx edx, ch
mov dword [esp + 0x18], eax
movzx eax, byte [esp + 0x45]
shl edx, 8
add edx, eax
movzx eax, byte [esp + 0x46]
shl edx, 8
add edx, eax
mov ecx, dword [esp + 0x47]
shl edx, 8
movzx eax, cl
add edx, eax
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
movzx edx, ch
mov ecx, dword [esp + 0x4b]
mov dword [esp + 0x1c], eax
movzx eax, byte [esp + 0x49]
shl edx, 8
add edx, eax
movzx eax, byte [esp + 0x4a]
shl edx, 8
add edx, eax
movzx eax, cl
shl edx, 8
add edx, eax
movzx ecx, ch
or eax, 0xffffffff
cmp edx, 0x7fffffff
cmovbe eax, edx
shl ecx, 8
mov dword [esp + 0x20], eax
movzx eax, byte [esp + 0x4d]
add ecx, eax
movzx eax, byte [esp + 0x4e]
shl ecx, 8
add ecx, eax
movzx eax, byte [esp + 0x4f]
shl ecx, 8
add ecx, eax
mov eax, 0xffffffff
cmp ecx, 0x7fffffff
cmovbe eax, ecx
mov dword [esp + 0x24], eax
cmp esi, 0xffffffff
je 0x5455a8
cmp dword [esp + 0x2c], 0xffffffff
je 0x5455a8
cmp dword [esp + 0x10], 0xffffffff
je 0x5455a8
cmp dword [esp + 0x14], 0xffffffff
je 0x5455a8
cmp dword [esp + 0x18], 0xffffffff
je 0x5455a8
cmp dword [esp + 0x1c], 0xffffffff
je 0x5455a8
cmp dword [esp + 0x20], 0xffffffff
je 0x5455a8
cmp eax, 0xffffffff
je 0x5455a8
movzx eax, word [edi + 0x30e]
test ax, ax
js 0x5452a3
mov ecx, edi
test al, 0x10
je 0x54556b
or eax, 0x8000
mov edx, ebx
mov word [edi + 0x30e], ax
call fcn.0053fc20
test dword [edi + 0x78], 0x100000
mov ecx, edi
je 0x5455e5
push str.duplicate
jmp 0x54528c
or eax, 0x10
lea edx, [edi + 0x2c4]
mov word [edi + 0x30e], ax
lea eax, [esp + 0x10]
push 1
push eax
call fcn.00540f60
add esp, 8
mov edx, ebx
mov ecx, edi
call fcn.0053fc20
mov ecx, dword [esp + 0x12c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00581335
mov esp, ebp
pop ebp
ret
test dword [edi + 0x78], 0x100000
mov ecx, edi
je 0x5455ef
push str.invalid_values
jmp 0x54528c
mov edx, str.Call_to_NULL_read_function
call fcn.00538fc0
mov edx, str.missing_IHDR
call fcn.00539180
mov edx, str.out_of_place
call fcn.00539180
mov edx, str.invalid
call fcn.00539180
mov edx, str.duplicate
call fcn.00539180
mov edx, str.invalid_values
call fcn.00539180
int3