Function at 0x4152f0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57e621
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x61b660]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x5a6ffc]
push eax
push 0
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.004065e0
mov dword [ebp - 0x6c], 0x5a729c
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
and edx, 0x40
je 0x415349
mov dword [ebp - 0x6c], 0x5c19fc
jmp 0x41535b
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
and ecx, 0x20
je 0x41535b
mov dword [ebp - 0x6c], 0x5c19f8
mov edx, dword [ebp + 0xc]
mov dword [edx], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0xb8], eax
mov ecx, dword [ebp - 0x6c]
push ecx
mov edx, dword [ebp - 0xb8]
push edx
call fcn.0052a3b8
add esp, 8
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx], 0
jne 0x4153e5
lea eax, [ebp - 0x2c]
push eax
call fcn.004110a0
add esp, 4
mov dword [ebp - 0x158], eax
mov ecx, dword [ebp - 0x158]
mov dword [ebp - 0xbc], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0xbc]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.00405ab0
mov dword [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x2c]
call fcn.00406060
mov dword [ebp - 4], 0xffffffff
xor al, al
jmp 0x415955
mov byte [ebp - 0x65], 1
mov dword [ebp - 0x70], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
and ecx, 0x10
je 0x41573e
push 2
push 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
call fcn.0052a280
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
call fcn.0052e153
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
push 0
push 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
push eax
call fcn.0052a280
add esp, 0xc
mov dword [ebp - 0x74], 0x400
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
cmp edx, dword [ebp - 0x74]
jge 0x415452
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov dword [ebp - 0x74], ecx
cmp dword [ebp - 0x74], 0
je 0x415739
mov edx, dword [ebp - 0x74]
push edx
call fcn.0042a4d4
add esp, 4
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x78], eax
cmp dword [ebp - 0x74], 0
je 0x4154a2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
push 1
mov eax, dword [ebp - 0x74]
push eax
mov ecx, dword [ebp - 0x78]
push ecx
call fcn.0052a1d9
add esp, 0x10
sub eax, 1
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x65], al
movzx edx, byte [ebp - 0x65]
test edx, edx
je 0x415721
mov dword [ebp - 0x7c], 0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
and ecx, 0xfffffffa
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x10], 1
mov ecx, dword [ebp - 0x7c]
shl ecx, 4
cmp dword [ecx + 0x616a90], 0
je 0x4155c6
mov edx, dword [ebp - 0x7c]
shl edx, 4
mov eax, dword [ebp - 0x70]
cmp eax, dword [edx + 0x616a94]
jge 0x415527
mov ecx, dword [ebp - 0x70]
cmp ecx, dword [ebp - 0x74]
jge 0x41551a
mov edx, dword [ebp - 0x78]
add edx, dword [ebp - 0x70]
movsx eax, byte [edx]
mov ecx, dword [ebp - 0x7c]
shl ecx, 4
mov edx, dword [ecx + 0x616a90]
mov ecx, dword [ebp - 0x70]
movsx edx, byte [edx + ecx]
cmp eax, edx
je 0x41551c
jmp 0x415527
mov eax, dword [ebp - 0x70]
add eax, 1
mov dword [ebp - 0x70], eax
jmp 0x4154e1
mov ecx, dword [ebp - 0x7c]
shl ecx, 4
mov edx, dword [ebp - 0x70]
cmp edx, dword [ecx + 0x616a94]
jne 0x4155b1
mov eax, dword [ebp - 0x7c]
shl eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 4]
or edx, dword [eax + 0x616a9c]
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], edx
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
sub edx, dword [ebp - 0x70]
mov eax, dword [ebp + 0xc]
mov dword [eax + 8], edx
cmp dword [ebp - 0x70], 2
jne 0x41556f
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x10], 2
mov edx, dword [ebp - 0x7c]
shl edx, 4
mov eax, dword [edx + 0x616a98]
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0xc8]
push ecx
call fcn.005291f0
add esp, 4
mov dword [ebp - 0xc0], eax
mov edx, dword [ebp - 0xc0]
push edx
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x34
call fcn.004064c0
jmp 0x4155c6
mov ecx, dword [ebp - 0x7c]
add ecx, 1
mov dword [ebp - 0x7c], ecx
mov dword [ebp - 0x70], 0
jmp 0x4154ce
mov edx, dword [ebp - 0x74]
cmp edx, dword [ebp - 0x70]
jle 0x4155e2
push 0
mov eax, dword [ebp - 0x70]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
call fcn.0052a280
add esp, 0xc
cmp dword [ebp - 0x70], 0
jne 0x4156d9
lea eax, [ebp - 0xd1]
mov dword [ebp - 0xd0], eax
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x15c], ecx
mov dword [ebp - 4], 2
push 0
push 0
lea ecx, [ebp - 0x98]
call fcn.00406060
mov dword [ebp - 4], 3
mov edx, dword [ebp - 0x74]
push edx
mov eax, dword [ebp - 0x78]
push eax
lea ecx, [ebp - 0x98]
call fcn.004064c0
push ecx
mov ecx, esp
mov dword [ebp - 0xa4], esp
mov dword [ebp - 0xdc], ecx
cmp dword [ebp - 0x84], 0x10
jb 0x41565a
mov edx, dword [ebp - 0x98]
mov dword [ebp - 0x160], edx
jmp 0x415666
lea eax, [ebp - 0x98]
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0xdc]
mov edx, dword [ebp - 0x160]
mov dword [ecx], edx
lea eax, [ebp - 0x48]
push eax
call fcn.004108b0
add esp, 8
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x164]
mov dword [ebp - 0xe0], ecx
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0xe0]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x34
call fcn.00405ab0
mov byte [ebp - 4], 5
push 0
push 1
lea ecx, [ebp - 0x48]
call fcn.00406060
mov byte [ebp - 4], 3
mov dword [ebp - 4], 6
push 0
push 1
lea ecx, [ebp - 0x98]
call fcn.00406060
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
xor ecx, ecx
cmp dword [eax + 0x44], 0
sete cl
movzx edx, cl
test edx, edx
je 0x415721
mov eax, dword [ebp - 0x78]
movsx ecx, byte [eax]
cmp ecx, 0x3c
jne 0x415721
push 0x5bf9cc
call fcn.005291f0
add esp, 4
mov dword [ebp - 0xe4], eax
mov edx, dword [ebp - 0xe4]
push edx
push 0x5bf9cc
mov ecx, dword [ebp + 0xc]
add ecx, 0x34
call fcn.004064c0
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0xa8], eax
mov ecx, dword [ebp - 0xa8]
push ecx
call fcn.0042a4c9
add esp, 4
jmp 0x41586a
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
and eax, 0x20
je 0x41586a
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x10], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
and eax, 0x40
je 0x415776
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
call fcn.0052e153
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], eax
mov edx, dword [ebp + 0xc]
cmp dword [edx + 8], 0
jne 0x41586a
mov dword [ebp - 0x9c], 0
mov eax, dword [ebp - 0x9c]
shl eax, 4
cmp dword [eax + 0x616a90], 0
je 0x41586a
mov ecx, dword [ebp - 0x9c]
shl ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 4]
and eax, dword [ecx + 0x616a9c]
je 0x415856
mov ecx, dword [ebp - 0x9c]
shl ecx, 4
mov edx, dword [ecx + 0x616a94]
mov dword [ebp - 0x70], edx
cmp dword [ebp - 0x70], 2
jne 0x415823
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x10], 2
mov ecx, dword [ebp - 0x9c]
shl ecx, 4
mov edx, dword [ecx + 0x616a98]
mov dword [ebp - 0xfc], edx
mov eax, dword [ebp - 0xfc]
push eax
call fcn.005291f0
add esp, 4
mov dword [ebp - 0xf4], eax
mov ecx, dword [ebp - 0xf4]
push ecx
mov edx, dword [ebp - 0xfc]
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x34
call fcn.004064c0
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
push 1
mov edx, dword [ebp - 0x70]
push edx
mov eax, dword [ebp - 0x9c]
shl eax, 4
mov ecx, dword [eax + 0x616a90]
push ecx
call fcn.0052a526
add esp, 0x10
sub eax, 1
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x65], al
jmp 0x41586a
mov edx, dword [ebp - 0x9c]
add edx, 1
mov dword [ebp - 0x9c], edx
jmp 0x41578d
movzx eax, byte [ebp - 0x65]
test eax, eax
jne 0x4158ca
lea ecx, [ebp - 0x64]
push ecx
call fcn.004110a0
add esp, 4
mov dword [ebp - 0x168], eax
mov edx, dword [ebp - 0x168]
mov dword [ebp - 0x100], edx
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x100]
push eax
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.00405ab0
mov dword [ebp - 4], 8
push 0
push 1
lea ecx, [ebp - 0x64]
call fcn.00406060
mov dword [ebp - 4], 0xffffffff
xor al, al
jmp 0x415955
mov ecx, dword [ebp + 0xc]
xor edx, edx
cmp dword [ecx + 0x44], 0
sete dl
movzx eax, dl
test eax, eax
jne 0x415952
mov ecx, dword [0x5a6ffc]
push ecx
push 0
mov edx, dword [ebp + 0xc]
add edx, 0x34
push edx
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.00405c70
cmp dword [ebp - 0x70], 0
je 0x415928
push str._BOM_
call fcn.005291f0
add esp, 4
mov dword [ebp - 0x124], eax
mov eax, dword [ebp - 0x124]
push eax
push str._BOM_
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.00406360
push 0x5a7344
call fcn.005291f0
add esp, 4
mov dword [ebp - 0x134], eax
mov ecx, dword [ebp - 0x134]
push ecx
push 0x5a7344
mov ecx, dword [ebp + 0xc]
add ecx, 0x18
call fcn.00406360
mov al, byte [ebp - 0x65]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0052927b
mov esp, ebp
pop ebp
ret