Function at 0x404700
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 0x4256dc
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x18]
push ecx
call fcn.00403410
push 0x4256c8
lea edx, [esp + 0x84]
push edx
lea eax, [esp + 0x20]
push eax
call fcn.00403410
add esp, 0x18
lea ecx, [esp + 0x28]
call fcn.0040fb70
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 0x404d2d
push ebp
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
cmp ebp, 4
jae 0x40480c
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x60]
cmp eax, 0x42db64
mov dword [esp + 0x2c], vtable.TiXmlDocument.0
je 0x40479c
push eax
call fcn.00413a65
add esp, 4
lea ecx, [esp + 0x2c]
call fcn.0040f880
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 0x4047c5
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 0x4047e1
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 0x404801
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.004134f9
push ebx
xor ebx, ebx
mov esi, eax
push ebx
push esi
call fcn.00414400
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 0x404855
cmp byte [esi + 1], 0x3f
jne 0x404855
cmp byte [esi + 2], 0x78
jne 0x404855
cmp byte [esi + 3], 0x6d
jne 0x404855
cmp byte [esi + 4], 0x6c
je 0x404863
mov edx, dword [esp + 0x24]
push edx
push esi
call fcn.00401240
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x30]
call fcn.0040f1f0
push ebx
push ebx
push esi
lea ecx, [esp + 0x3c]
call fcn.00411830
push esi
call fcn.0041382c
add esp, 4
cmp byte [esp + 0x5c], 1
jne 0x404924
mov eax, dword [esp + 0x64]
cmp eax, 0x42db64
mov dword [esp + 0x30], vtable.TiXmlDocument.0
je 0x4048af
push eax
call fcn.00413a65
add esp, 4
lea ecx, [esp + 0x30]
call fcn.0040f880
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 0x4048d8
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 0x4048f8
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 0x404918
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 [0x42dbf8]
mov eax, dword [edx + 0xc]
mov ecx, 0x42dbf8
call eax
add eax, 0x10
push 0x425688
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], eax
call fcn.00403aa0
lea ecx, [esp + 0x30]
call fcn.0040f2c0
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 0x404bc1
fld dword [0x425684]
push 0x425680
mov ecx, esi
fstp dword [esp + 0x24]
call fcn.0040f9e0
cmp eax, edi
je 0x404991
push eax
call fcn.00414c4c
fstp dword [esp + 0x24]
add esp, 4
fld dword [esp + 0x20]
fcomp qword [0x425678]
fnstsw ax
test ah, 1
jne 0x4049db
lea ecx, [esp + 0x10]
call fcn.00401c80
lea ecx, [esp + 0x30]
call fcn.00401690
lea ecx, [esp + 0x14]
call fcn.00401c80
lea ecx, [esp + 0x18]
call fcn.00401c80
lea ecx, [esp + 0x7c]
call fcn.00401c80
pop ebx
pop ebp
pop edi
xor eax, eax
pop esi
add esp, 0x68
ret 4
push 0x42566c
mov ecx, esi
call fcn.0040f2f0
cmp eax, edi
je 0x404bc1
mov ecx, eax
call fcn.0040f2c0
cmp eax, edi
mov dword [esp + 0x20], eax
je 0x404bc1
mov ecx, dword [esp + 0x20]
push 0x425664
call fcn.0040f2f0
mov edx, eax
cmp edx, edi
mov dword [esp + 0x2c], edx
je 0x404baa
mov eax, dword [edx + 0x4c]
lea ecx, [edx + 0x2c]
cmp eax, ecx
je 0x404a99
cmp eax, edi
je 0x404a99
lea esp, [esp]
mov edx, dword [eax + 0x14]
add edx, 8
mov edi, 0x42565c
mov esi, edx
mov ecx, 5
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x404a50
mov ebx, dword [eax + 0x18]
add ebx, 8
jmp 0x404a8a
mov edi, 0x425654
mov esi, edx
mov ecx, 5
xor ebp, ebp
repe cmpsb byte [esi], byte es:[edi]
jne 0x404a6e
mov ecx, dword [eax + 0x18]
add ecx, 8
mov dword [esp + 0x1c], ecx
jmp 0x404a8a
mov esi, edx
mov edi, 0x42564c
mov ecx, 5
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x404a8a
mov ecx, dword [eax + 0x18]
add ecx, 8
mov dword [esp + 0x28], ecx
mov ecx, eax
call fcn.0040f4a0
test eax, eax
jne 0x404a30
mov edx, dword [esp + 0x2c]
mov ecx, edx
call fcn.0040f3f0
test ebx, ebx
mov ebp, eax
je 0x404baa
mov eax, ebx
lea edx, [eax + 1]
nop
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404ab0
sub eax, edx
je 0x404baa
mov edi, 0x425648
mov esi, ebx
mov ecx, 2
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x404baa
cmp dword [esp + 0x1c], eax
je 0x404baa
mov eax, dword [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404ae8
sub eax, edx
je 0x404baa
push 0x425634
lea ecx, [esp + 0x14]
call fcn.00403bf0
push ebx
lea ecx, [esp + 0x14]
call fcn.00403bf0
push 0x425630
lea ecx, [esp + 0x14]
call fcn.00403bf0
push 0x425628
lea ecx, [esp + 0x14]
call fcn.00403bf0
mov ecx, dword [esp + 0x1c]
push ecx
lea ecx, [esp + 0x14]
call fcn.00403bf0
push 0x42561c
lea ecx, [esp + 0x14]
call fcn.00403bf0
mov edx, dword [esp + 0x28]
push edx
lea ecx, [esp + 0x14]
call fcn.00403bf0
push 0x425610
lea ecx, [esp + 0x14]
call fcn.00403bf0
test ebp, ebp
je 0x404b89
mov eax, ebp
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404b70
sub eax, edx
je 0x404b89
push ebp
lea ecx, [esp + 0x14]
call fcn.00403bf0
jmp 0x404b97
push 0x425600
lea ecx, [esp + 0x14]
call fcn.00403c30
push 0x4255f0
lea ecx, [esp + 0x14]
call fcn.00403bf0
add dword [esp + 0x24], 1
mov ecx, dword [esp + 0x20]
call fcn.0040f330
xor edi, edi
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x404a02
push 0x4255e4
lea ecx, [esp + 0x14]
call fcn.00403bf0
cmp dword [esp + 0x24], edi
mov esi, dword [esp + 0x14]
jle 0x404c95
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 0x404c95
lea ecx, [esp + 0x10]
mov dword [esp + 0x2c], edi
call fcn.00402240
mov ebx, eax
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x404c11
sub eax, edx
lea esi, [eax + 1]
push esi
call fcn.004134f9
push esi
mov edi, eax
push ebx
push edi
call fcn.00413a70
push esi
push edi
call fcn.004011c0
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.00413a65
add esp, 4
lea ecx, [esp + 0x10]
call fcn.00401c80
lea ecx, [esp + 0x30]
call fcn.00401690
lea ecx, [esp + 0x14]
call fcn.00401c80
lea ecx, [esp + 0x18]
call fcn.00401c80
lea ecx, [esp + 0x7c]
call fcn.00401c80
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 0x404cb5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
call fcn.00401690
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404cda
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 0x404cfa
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 0x404c86
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, 0x42db64
mov dword [esp + 0x28], vtable.TiXmlDocument.0
je 0x404d49
push eax
call fcn.00413a65
add esp, 4
lea ecx, [esp + 0x28]
call fcn.0040f880
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 0x404d72
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 0x404d8e
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 0x404dae
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