Function at 0x404490
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x68
push esi
push edi
push 0x423784
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00403450
push 0x423770
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00403450
add esp, 0x18
lea ecx, [esp + 0x28]
call fcn.0040e320
mov esi, dword [esp + 0x10]
push 0
push 0x80
push 3
push 0
push 3
push SysReAllocStringLen
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x404abd
push ebp
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 4
jae 0x40459c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x60]
cmp eax, 0x42bb4c
mov dword [esp + 0x2c], vtable.TiXmlDocument.0
je 0x40452c
push eax
call fcn.00412358
add esp, 4
lea ecx, [esp + 0x2c]
call fcn.0040e030
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404555
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404571
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x78]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404591
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x68
ret 4
push ebx
lea ebx, [ebp + 1]
push ebx
call fcn.00411f0c
push ebx
xor ebx, ebx
mov esi, eax
push ebx
push esi
call fcn.00412ba0
add esp, 0x10
push ebx
lea ecx, [esp + 0x28]
push ecx
push ebp
push esi
push edi
mov dword [esp + 0x38], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esi], 0x3c
jne 0x4045e5
cmp byte [esi + 1], 0x3f
jne 0x4045e5
cmp byte [esi + 2], 0x78
jne 0x4045e5
cmp byte [esi + 3], 0x6d
jne 0x4045e5
cmp byte [esi + 4], 0x6c
je 0x4045f3
mov edx, dword [esp + 0x24]
push edx
push esi
call fcn.00401280
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x30]
call fcn.0040d9a0
push ebx
push ebx
push esi
lea ecx, [esp + 0x3c]
call fcn.0040ffe0
push esi
call fcn.00411fd4
add esp, 4
cmp byte [esp + 0x5c], 1
jne 0x4046b4
mov eax, dword [esp + 0x64]
cmp eax, 0x42bb4c
mov dword [esp + 0x30], vtable.TiXmlDocument.0
je 0x40463f
push eax
call fcn.00412358
add esp, 4
lea ecx, [esp + 0x30]
call fcn.0040e030
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404668
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404688
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x7c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4046a8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop ebx
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x68
ret 4
mov edx, dword [0x42bbe0]
mov eax, dword [edx + 0xc]
mov ecx, 0x42bbe0
call eax
add eax, 0x10
push 0x423730
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.00403aa0
lea ecx, [esp + 0x30]
call fcn.0040da70
xor edi, edi
mov esi, eax
cmp esi, edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
je 0x404951
fld dword [0x42372c]
push 0x423728
mov ecx, esi
fstp dword [esp + 0x24]
call fcn.0040e190
cmp eax, edi
je 0x404721
push eax
call fcn.004133ed
fstp dword [esp + 0x24]
add esp, 4
fld dword [esp + 0x20]
fcomp qword [0x423720]
fnstsw ax
test ah, 1
jne 0x40476b
lea ecx, [esp + 0x10]
call fcn.00401c40
lea ecx, [esp + 0x30]
call fcn.004016f0
lea ecx, [esp + 0x14]
call fcn.00401c40
lea ecx, [esp + 0x18]
call fcn.00401c40
lea ecx, [esp + 0x7c]
call fcn.00401c40
pop ebx
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x68
ret 4
push 0x423718
mov ecx, esi
call fcn.0040daa0
cmp eax, edi
je 0x404951
mov ecx, eax
call fcn.0040da70
cmp eax, edi
mov dword [esp + 0x20], eax
je 0x404951
mov ecx, dword [esp + 0x20]
push 0x423710
call fcn.0040daa0
mov edx, eax
cmp edx, edi
mov dword [esp + 0x2c], edx
je 0x40493a
mov eax, dword [edx + 0x4c]
lea ecx, [edx + 0x2c]
cmp eax, ecx
je 0x404829
cmp eax, edi
je 0x404829
lea esp, [esp]
mov edx, dword [eax + 0x14]
add edx, 8
mov edi, 0x423708
mov esi, edx
mov ecx, 5
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x4047e0
mov ebx, dword [eax + 0x18]
add ebx, 8
jmp 0x40481a
mov edi, 0x423700
mov esi, edx
mov ecx, 5
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x4047fe
mov ecx, dword [eax + 0x18]
add ecx, 8
mov dword [esp + 0x1c], ecx
jmp 0x40481a
mov esi, edx
mov edi, 0x4236f8
mov ecx, 5
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40481a
mov ecx, dword [eax + 0x18]
add ecx, 8
mov dword [esp + 0x28], ecx
mov ecx, eax
call fcn.0040dc20
test eax, eax
jne 0x4047c0
mov edx, dword [esp + 0x2c]
mov ecx, edx
call fcn.0040db70
test ebx, ebx
mov ebp, eax
je 0x40493a
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404840
sub eax, edx
je 0x40493a
mov edi, 0x4236f4
mov esi, ebx
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40493a
cmp dword [esp + 0x1c], eax
je 0x40493a
mov eax, dword [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404878
sub eax, edx
je 0x40493a
push 0x4236e0
lea ecx, [esp + 0x14]
call fcn.00403ca0
push ebx
lea ecx, [esp + 0x14]
call fcn.00403ca0
push 0x4236dc
lea ecx, [esp + 0x14]
call fcn.00403ca0
push 0x4236d4
lea ecx, [esp + 0x14]
call fcn.00403ca0
mov ecx, dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00403ca0
push 0x4236c8
lea ecx, [esp + 0x14]
call fcn.00403ca0
mov edx, dword [esp + 0x28]
push edx
lea ecx, [esp + 0x14]
call fcn.00403ca0
push 0x4236bc
lea ecx, [esp + 0x14]
call fcn.00403ca0
test ebp, ebp
je 0x404919
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404900
sub eax, edx
je 0x404919
push ebp
lea ecx, [esp + 0x14]
call fcn.00403ca0
jmp 0x404927
push 0x4236ac
lea ecx, [esp + 0x14]
call fcn.00403ce0
push 0x42369c
lea ecx, [esp + 0x14]
call fcn.00403ca0
add dword [esp + 0x24], 1
mov ecx, dword [esp + 0x20]
call fcn.0040dae0
xor edi, edi
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x404792
push 0x423690
lea ecx, [esp + 0x14]
call fcn.00403ca0
cmp dword [esp + 0x24], edi
mov esi, dword [esp + 0x14]
jle 0x404a25
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x404a25
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], edi
call fcn.00402200
mov ebx, eax
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4049a1
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.00411f0c
push esi
mov edi, eax
push ebx
push edi
call fcn.00412360
push esi
push edi
call fcn.00401200
add esp, 0x18
push 0
lea eax, [esp + 0x30]
push eax
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00412358
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00401c40
lea ecx, [esp + 0x30]
call fcn.004016f0
lea ecx, [esp + 0x14]
call fcn.00401c40
lea ecx, [esp + 0x18]
call fcn.00401c40
lea ecx, [esp + 0x7c]
call fcn.00401c40
pop ebx
pop ebp
pop edi
mov eax, 1
pop esi
add esp, 0x68
ret 4
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a45
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
call fcn.004016f0
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x7c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404a16
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop ebx
pop ebp
pop edi
mov eax, 1
pop esi
add esp, 0x68
ret 4
mov eax, dword [esp + 0x5c]
cmp eax, 0x42bb4c
mov dword [esp + 0x28], vtable.TiXmlDocument.0
je 0x404ad9
push eax
call fcn.00412358
add esp, 4
lea ecx, [esp + 0x28]
call fcn.0040e030
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b1e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x74]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404b3e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
xor eax, eax
pop esi
add esp, 0x68
ret 4