Function at 0x1005103
Capabilities:
Check if file exists
Get file attributes
Get system information on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x370
mov eax, dword [0x100fb04]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 7
pop ecx
push 6
mov esi, 0x1001900
lea edi, [ebp - 0xd4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
pop ecx
mov esi, 0x10018e4
lea edi, [ebp - 0x7c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 6
pop ecx
mov esi, 0x10018c8
lea edi, [ebp - 0x98]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
push 5
pop ecx
mov esi, 0x10018b0
lea edi, [ebp - 0x60]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 5
pop ecx
mov esi, 0x1001898
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 5
pop ecx
mov esi, 0x1001880
lea edi, [ebp - 0x48]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 8
pop ecx
push 0xc
mov esi, 0x1001860
lea edi, [ebp - 0xf4]
rep movsd dword es:[edi], dword [esi]
pop ecx
mov esi, 0x100182c
lea edi, [ebp - 0x22c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, 0x1001818
lea edi, [ebp - 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ebx, dword [ebp + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 7
movsb byte es:[edi], byte [esi]
pop ecx
mov esi, 0x10017fc
lea edi, [ebp - 0xb4]
rep movsd dword es:[edi], dword [esi]
xor esi, esi
push esi
push 0x80
mov dword [ebp - 0x344], ebx
mov dword [ebp - 0x340], 1
mov dword [ebp - 0x370], 0x10017dc
mov dword [ebp - 0x36c], 0x10017c8
mov dword [ebp - 0x368], 0x10017a8
mov dword [ebp - 0x364], 0x1001790
mov dword [ebp - 0x360], 0x1001774
mov dword [ebp - 0x35c], 0x1001748
mov dword [ebp - 0x358], 0x1001730
mov dword [ebp - 0x354], 0x1001704
mov dword [ebp - 0x350], 0x10016cc
mov dword [ebp - 0x34c], esi
push 2
push esi
push esi
push 0x40000000
push 0x1010508
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x334], eax
cmp eax, 0xffffffff
jne 0x100526e
push esi
push 0x10
push esi
push esi
push 0x462
push ebx
call fcn.01002a45
xor eax, eax
jmp 0x10058d5
mov edi, 0x200
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x330], eax
cmp eax, esi
jne 0x10052a4
push esi
push 0x10
push esi
push esi
push 0x44c
push ebx
call fcn.01002a45
push dword [ebp - 0x334]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1005267
push 0x100
lea eax, [ebp - 0x32c]
push eax
push 0x41c
call fcn.0100210a
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push esi
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x32c]
push eax
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push eax
lea eax, [ebp - 0x32c]
push eax
push dword [ebp - 0x334]
call esi
push 0x101060c
lea eax, [ebp - 0xd4]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push dword [0x1011578]
lea eax, [ebp - 0x7c]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push dword [0x101157c]
lea eax, [ebp - 0x98]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0x1010710
lea eax, [ebp - 0x60]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0x1010814
lea eax, [ebp - 0x30]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
test dword [0x101158c], 0x10000
mov eax, 0x10016c4
jne 0x100541d
mov eax, 0x10016bc
push eax
lea eax, [ebp - 0x48]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
mov eax, dword [0x101158c]
test eax, 0x20000
je 0x1005462
xor eax, eax
inc eax
jmp 0x100547a
test eax, 0x40000
je 0x100546e
push 2
pop eax
jmp 0x100547a
and eax, 0x80000
neg eax
sbb eax, eax
and eax, 3
push dword [eax*4 + 0x100f2c8]
lea eax, [ebp - 0xf4]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0x1011060
lea eax, [ebp - 0x22c]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0x1011a20
push 0x104
lea eax, [ebp - 0x1f8]
push eax
push 0x10016b8
push 0x10016ac
push 0x1001444
call fcn.01002e76
lea eax, [ebp - 0x1f8]
push eax
lea eax, [ebp - 0x18]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0x1011a20
push 0x15
push 0x1001698
push 0x1001444
call fcn.010021fb
test eax, eax
jg 0x100556e
push 0x15
pop eax
push eax
lea eax, [ebp - 0xb4]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010028bd
add esp, 0x10
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
and dword [ebp - 0x33c], 0
mov dword [ebp - 0x348], 0x10017dc
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x348]
call ebx
push eax
push dword [ebp - 0x348]
push dword [ebp - 0x334]
call esi
inc dword [ebp - 0x33c]
mov eax, dword [ebp - 0x33c]
mov eax, dword [ebp + eax*4 - 0x370]
mov dword [ebp - 0x348], eax
test eax, eax
jne 0x10055b6
mov eax, dword [0x10115a4]
mov dword [ebp - 0x33c], eax
jmp 0x1005606
mov eax, dword [ebp - 0x33c]
test eax, eax
je 0x10057a1
push dword [eax + 4]
push edi
push dword [ebp - 0x330]
call fcn.01002653
mov eax, dword [ebp - 0x33c]
push dword [eax]
push edi
push dword [ebp - 0x330]
call fcn.010026dd
push dword [ebp - 0x330]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x1005774
test al, 0x10
jne 0x1005774
test byte [0x101158c], 2
lea eax, [ebp - 0x1f8]
je 0x10056b4
push 0x100148c
push 0x104
push eax
call fcn.01002653
test eax, eax
js 0x1005267
push dword [ebp - 0x330]
lea eax, [ebp - 0x1f8]
push 0x104
push eax
call fcn.010026dd
test eax, eax
js 0x1005267
push 0x100148c
push 0x104
lea eax, [ebp - 0x1f8]
push eax
call fcn.010026dd
test eax, eax
js 0x1005267
jmp 0x10056ce
push 0x104
push eax
push dword [ebp - 0x330]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test eax, eax
je 0x1005766
push 0
lea eax, [ebp - 0x338]
push eax
lea eax, [ebp - 0x1f8]
push eax
call ebx
push eax
lea eax, [ebp - 0x1f8]
push eax
push dword [ebp - 0x334]
call esi
push 0
lea eax, [ebp - 0x338]
push eax
push 0x1001694
call ebx
push eax
push 0x1001694
push dword [ebp - 0x334]
call esi
mov ecx, dword [ebp - 0x33c]
mov ecx, dword [ecx + 0xc]
mov dword [ebp - 0x340], eax
mov dword [ebp - 0x33c], ecx
test eax, eax
jne 0x1005600
push dword [ebp - 0x330]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x334]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
cmp dword [ebp - 0x340], eax
jne 0x10058d2
push eax
push 0x10
push eax
push eax
push 0x463
push dword [ebp - 0x344]
jmp 0x1005262
xor eax, eax
push eax
push 0x10
push eax
push eax
push 0x46f
jmp 0x1005785
push 0
push 0x10
push 0
push dword [ebp - 0x330]
push 0x46e
push dword [ebp - 0x344]
call fcn.01002a45
push dword [ebp - 0x330]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1005296
cmp dword [ebp - 0x340], 0
je 0x100572b
test byte [0x101158c], 4
je 0x100572b
lea eax, [ebp - 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push 0x1011a20
push 0xffffffffffffffff
push 0x1001684
push 0x1001444
call fcn.010021fb
mov dword [ebp - 0x33c], 0x100f27c
cmp dword [ebp - 0x340], 0
je 0x100572b
mov ecx, dword [ebp - 0x33c]
xor eax, eax
push eax
push dword [ecx]
push eax
push eax
call fcn.01002c28
test eax, eax
jne 0x100589f
push 0x104
lea eax, [ebp - 0x1f8]
push eax
mov eax, dword [ebp - 0x33c]
push dword [eax]
call fcn.01003d2a
test eax, eax
je 0x10058bb
push 0x100148c
push edi
push dword [ebp - 0x330]
call fcn.01002653
lea eax, [ebp - 0x1f8]
push eax
push edi
push dword [ebp - 0x330]
call fcn.010026dd
push 0x100148c
push edi
push dword [ebp - 0x330]
call fcn.010026dd
push 0
lea eax, [ebp - 0x338]
push eax
push dword [ebp - 0x330]
call ebx
push eax
push dword [ebp - 0x330]
push dword [ebp - 0x334]
call esi
push 0
lea eax, [ebp - 0x338]
push eax
push 2
push 0x1001694
push dword [ebp - 0x334]
call esi
mov dword [ebp - 0x340], eax
add dword [ebp - 0x33c], 4
cmp dword [ebp - 0x33c], 0x100f280
jl 0x10057e4
jmp 0x100572b
push 0
push 0x10
push 0
lea eax, [ebp - 0x1f8]
push eax
push 0x46d
jmp 0x1005785
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0100cb7f
leave
ret 4