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

Disassembly:
mov eax, 0x28
call fcn.005b2630
mov eax, dword [0x644a10]
xor eax, esp
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x38]
push ebx
mov ebx, dword [esp + 0x38]
push ebp
push esi
mov esi, dword [esp + 0x38]
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
shr eax, 4
mov dword [esp + 0x14], edx
xor ebp, ebp
mov edx, eax
add edx, ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x14]
adc ebp, ecx
push edi
mov edi, dword [esp + 0x40]
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebp
test eax, eax
je 0x504134
xor eax, eax
cmp edx, edx
jne 0x504134
cmp ebp, eax
jne 0x504134
cmp dword [esi + 0x10], eax
je 0x504134
shr edx, 1
je 0x5040e5
lea esp, [esp]
inc eax
shr edx, 1
jne 0x5040e0
push eax
push esi
call fcn.00503700
add esp, 8
test eax, eax
jne 0x504108
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.005b2129
add esp, 0x28
ret
mov ecx, dword [esi + 0x40]
lea eax, [esi + 0x88]
push eax
mov eax, dword [esi + 0x50]
push ecx
mov ecx, dword [esi + 0xc]
lea edx, [esi + 0x78]
push edx
mov edx, dword [esp + 0x1c]
inc eax
push eax
mov eax, dword [esi + 0x10]
push ecx
push edx
push ebx
push edi
call eax
add esp, 0x20
jmp 0x504286
mov eax, dword [esp + 0x14]
add eax, 1
adc ecx, 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
cmp ecx, ebp
ja 0x50428a
jb 0x504158
cmp eax, edx
ja 0x50428a
mov edx, eax
and eax, 1
xor ebp, ebp
or eax, ebp
mov dword [esp + 0x10], 0
jne 0x504185
jmp 0x504170
inc dword [esp + 0x10]
shrd edx, ecx, 1
mov eax, edx
and eax, 1
xor ebp, ebp
shr ecx, 1
or eax, ebp
je 0x504170
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.00503700
add esp, 8
test eax, eax
je 0x5040f3
mov edx, dword [eax]
xor dword [esi + 0x78], edx
mov ecx, dword [eax + 4]
xor dword [esi + 0x7c], ecx
mov edx, dword [eax + 8]
xor dword [esi + 0x80], edx
mov eax, dword [eax + 0xc]
xor dword [esi + 0x84], eax
mov eax, dword [edi]
mov edx, dword [edi + 8]
xor eax, dword [esi + 0x78]
mov ecx, dword [edi + 4]
xor edx, dword [esi + 0x80]
xor ecx, dword [esi + 0x7c]
mov ebp, dword [edi + 0xc]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x84]
push eax
mov eax, dword [esi + 4]
mov dword [esp + 0x2c], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x34], ebp
xor dword [esp + 0x34], edx
push ecx
mov edx, ecx
push edx
add edi, 0x10
call eax
mov edx, dword [esi + 0x80]
xor dword [esp + 0x38], edx
mov eax, dword [esp + 0x30]
xor eax, dword [esi + 0x78]
mov ecx, dword [esp + 0x34]
xor ecx, dword [esi + 0x7c]
mov edx, dword [esp + 0x3c]
xor edx, dword [esi + 0x84]
xor dword [esi + 0x8c], ecx
xor dword [esi + 0x88], eax
xor dword [esi + 0x94], edx
mov ebp, dword [esp + 0x38]
xor dword [esi + 0x90], ebp
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], ebp
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0xc], edx
add ebx, 0x10
add eax, 1
adc ecx, 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
cmp ecx, ebp
jb 0x504158
ja 0x504286
cmp eax, dword [esp + 0x1c]
jbe 0x504158
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x48]
and eax, 0xf
mov dword [esp + 0x10], eax
jbe 0x50435f
mov ecx, dword [esi + 0x20]
xor dword [esi + 0x78], ecx
mov edx, dword [esi + 0x24]
xor dword [esi + 0x7c], edx
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x2c]
xor dword [esi + 0x80], ecx
mov ecx, dword [esi + 8]
xor dword [esi + 0x84], edx
lea eax, [esi + 0x78]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
mov eax, dword [esi]
call eax
mov edx, dword [esp + 0x1c]
add esp, 0xc
xor ecx, ecx
test edx, edx
je 0x504309
mov edx, edi
lea eax, [esp + 0x24]
sub edx, eax
mov edi, ebx
mov dword [esp + 0x14], edx
sub edi, eax
jmp 0x5042f4
mov edx, dword [esp + 0x14]
lea eax, [esp + ecx + 0x24]
mov dl, byte [edx + eax]
xor dl, byte [eax]
inc ecx
mov byte [edi + eax], dl
mov edx, dword [esp + 0x10]
cmp ecx, edx
jb 0x5042f0
xor eax, eax
push edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push ebx
push eax
call sub.MSVCR100.dll_memcpy
mov ecx, dword [esp + 0x1c]
mov byte [esp + ecx + 0x30], 0x80
mov edx, dword [esp + 0x30]
xor dword [esi + 0x88], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
xor dword [esi + 0x8c], eax
xor dword [esi + 0x90], ecx
add esp, 0xc
xor dword [esi + 0x94], edx
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x34]
pop edi
mov dword [esi + 0x54], ebp
mov dword [esi + 0x50], edx
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.005b2129
add esp, 0x28
ret