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

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov eax, 0xef53
push edi
mov edi, ecx
cmp word [esi + 0x38], ax
jne 0x499951
mov eax, dword [esi + 0x18]
mov dword [edi], eax
mov ecx, dword [esi + 0x1c]
mov dword [edi + 4], ecx
test ecx, ecx
je 0x499876
cmp eax, ecx
jne 0x499951
cmp eax, 6
ja 0x499951
lea ebx, [eax + 0xa]
mov dword [edi], ebx
mov ecx, dword [esi]
mov dword [edi + 8], ecx
mov eax, dword [esi + 4]
and dword [edi + 0x14], 0
mov dword [edi + 0x10], eax
mov eax, dword [esi + 0xc]
and dword [edi + 0x1c], 0
mov dword [edi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [edi + 0x20], eax
cmp ecx, 2
jb 0x499951
cmp ecx, eax
jbe 0x499951
xor eax, eax
cmp ebx, 0xa
sete al
cmp dword [esi + 0x14], eax
jne 0x499951
mov edx, dword [esi + 0x20]
mov dword [edi + 0x24], edx
mov eax, dword [esi + 0x24]
mov dword [edi + 0x28], eax
cmp edx, eax
jne 0x499951
test edx, edx
je 0x499951
mov eax, dword [esi + 0x28]
mov dword [edi + 0x2c], eax
cmp eax, 1
jb 0x499951
cmp eax, ecx
ja 0x499951
mov eax, dword [esi + 0x2c]
mov dword [edi + 0x30], eax
mov eax, dword [esi + 0x30]
mov dword [edi + 0x34], eax
mov eax, dword [esi + 0x40]
push 0xb
pop ecx
mov dword [edi + 0x38], eax
mov eax, dword [esi + 0x48]
mov dword [edi + 0x3c], eax
mov eax, dword [esi + 0x4c]
lea edx, [ecx + 0x75]
mov dword [edi + 0x40], eax
mov dword [edi + 0x44], ecx
mov word [edi + 0x48], dx
test eax, eax
je 0x49995e
mov eax, dword [esi + 0x54]
mov dword [edi + 0x44], eax
movzx edx, word [esi + 0x58]
mov word [edi + 0x48], dx
cmp eax, ecx
jb 0x499951
xor eax, eax
mov ecx, ebx
inc eax
mov ebp, edx
shl eax, cl
cmp ebp, eax
ja 0x499951
mov eax, 0x80
cmp dx, ax
jb 0x499951
xor ecx, ecx
xor eax, eax
inc eax
shl eax, cl
cmp eax, ebp
je 0x49995a
inc ecx
cmp ecx, 0x20
jb 0x499942
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret 4
test ecx, ecx
js 0x499951
mov ax, word [esi + 0x5a]
mov word [edi + 0x4a], ax
mov eax, dword [esi + 0x5c]
mov dword [edi + 0x4c], eax
mov eax, dword [esi + 0x60]
mov dword [edi + 0x50], eax
mov eax, dword [esi + 0x64]
mov dword [edi + 0x54], eax
lea eax, [esi + 0x68]
push 0x10
push eax
lea eax, [edi + 0x58]
push eax
call sub.msvcrt.dll_memcpy
push 0x10
lea eax, [esi + 0x78]
push eax
lea eax, [edi + 0x68]
push eax
call sub.msvcrt.dll_memcpy
push 0x40
lea eax, [esi + 0x88]
push eax
lea eax, [edi + 0x78]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0x24
mov eax, dword [esi + 0xe0]
mov dword [edi + 0xb8], eax
mov ax, word [esi + 0xfe]
mov word [edi + 0xbc], ax
mov eax, dword [esi + 0x108]
mov dword [edi + 0xc0], eax
mov eax, dword [edi + 0x50]
shr eax, 7
test al, 1
je 0x4999f5
mov ecx, dword [esi + 0x150]
xor eax, eax
or dword [edi + 0x10], eax
or dword [edi + 0x14], ecx
mov ecx, dword [esi + 0x158]
or dword [edi + 0x18], eax
or dword [edi + 0x1c], ecx
mov ebp, dword [edi + 0x14]
xor edx, edx
mov ebx, dword [edi + 0x10]
xor ecx, ecx
push 0x3f
pop eax
sub eax, dword [edi]
bts edx, eax
cmp eax, 0x20
cmovae ecx, edx
xor edx, ecx
cmp eax, 0x40
cmovae ecx, edx
cmp ebp, ecx
ja 0x499951
jb 0x499a27
cmp ebx, edx
jae 0x499951
mov ax, word [esi + 0x15c]
mov word [edi + 0xc4], ax
mov eax, dword [esi + 0x178]
mov ecx, dword [esi + 0x17c]
mov dword [edi + 0xc8], eax
mov dword [edi + 0xcc], ecx
test ebp, ebp
jne 0x499a5a
cmp ebx, 1
jb 0x499951
cmp dword [edi + 0x1c], ebp
ja 0x499951
jb 0x499a6e
cmp dword [edi + 0x18], ebx
ja 0x499951
mov ecx, edi
call fcn.004982fc
mov ebx, edx
xor ecx, ecx
mov edx, dword [edi + 8]
mov esi, eax
add edx, dword [edi + 0x2c]
push 0
push dword [edi + 0x2c]
adc ecx, ecx
add edx, 0xffffffff
adc ecx, 0xffffffff
push ecx
push edx
call fcn.005670b0
cmp esi, eax
jne 0x499951
cmp ebx, edx
jne 0x499951
mov al, 1
jmp 0x499953