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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x572058
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x5dafd0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x24], ebx
mov eax, dword [ebx + 0x20]
cmp dword [eax - 0xc], 0
lea edx, [eax - 0x10]
mov esi, dword [edx]
je 0x4052f0
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x4052cf
cmp dword [eax - 8], 0
jl 0x40571a
mov dword [eax - 0xc], 0
xor ecx, ecx
mov eax, dword [ebx + 0x20]
mov word [eax], cx
jmp 0x4052f0
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4052e3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 4]
mov ecx, 0x5b9ab8
test al, 0x40
je 0x405303
mov eax, 0x5b9ac0
jmp 0x40530d
test al, 0x20
mov eax, 0x5b9ac8
cmove eax, ecx
push eax
push dword [ebp + 8]
mov dword [ebx], 0
call fcn.0055a94c
add esp, 8
mov dword [ebx], eax
test eax, eax
jne 0x405340
mov ecx, ebx
call fcn.00405060
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebx + 4]
xor edi, edi
mov byte [ebp - 0x11], 1
mov dword [ebx + 0x18], 1
test cl, 0x10
je 0x405605
push 2
push edi
push eax
call fcn.0055a5cc
add esp, 0xc
push dword [ebx]
call fcn.00558eb9
add esp, 4
mov dword [ebx + 0x10], eax
push edi
push edi
push dword [ebx]
call fcn.0055a5cc
mov ecx, dword [ebx + 0x10]
mov eax, 0x400
add esp, 0xc
mov dword [ebp - 0x18], eax
cmp ecx, eax
jge 0x40539a
mov eax, ecx
mov dword [ebp - 0x18], eax
test eax, eax
je 0x4056cc
push eax
call fcn.0040df1d
add esp, 4
mov dword [ebp - 0x1c], eax
push dword [ebx]
push 1
push dword [ebp - 0x18]
push eax
call fcn.0055ab3c
add esp, 0x10
cmp eax, 1
sete byte [ebp - 0x11]
jne 0x4055f1
and dword [ebx + 4], 0xfffffffa
xor ecx, ecx
mov dword [ebp - 0x20], ecx
cmp dword [0x5db938], ecx
je 0x40546e
xor edx, edx
nop word [eax + eax]
mov esi, dword [edx + 0x5db93c]
xor edi, edi
test esi, esi
jle 0x405410
mov ebx, dword [ebp - 0x18]
nop
cmp edi, ebx
jge 0x40540a
mov eax, dword [ebp - 0x1c]
mov ecx, dword [edx + 0x5db938]
mov al, byte [eax + edi]
cmp al, byte [edi + ecx]
jne 0x40540a
inc edi
cmp edi, esi
jl 0x4053f0
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
cmp edi, esi
je 0x405429
inc ecx
xor edi, edi
mov edx, ecx
mov dword [ebp - 0x20], ecx
shl edx, 4
cmp dword [edx + 0x5db938], edi
jne 0x4053e0
jmp 0x40546e
shl ecx, 4
mov eax, dword [ecx + 0x5db944]
or dword [ebx + 4], eax
cmp edi, 2
jne 0x40543d
mov dword [ebx + 0x18], edi
mov edx, dword [ecx + 0x5db940]
lea eax, [ebx + 0x24]
test edx, edx
jne 0x40544e
xor ecx, ecx
jmp 0x405465
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405453
sub ecx, esi
lea eax, [ebx + 0x24]
sar ecx, 1
push ecx
push edx
mov ecx, eax
call fcn.004029a0
cmp dword [ebp - 0x18], edi
jle 0x405480
push 0
push edi
push dword [ebx]
call fcn.0055a5cc
add esp, 0xc
test edi, edi
jne 0x4055c0
call fcn.0040e23c
mov ecx, eax
test ecx, ecx
je 0x405724
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
push dword [ebp - 0x18]
mov dword [ebp - 4], edi
push dword [ebp - 0x1c]
push ecx
mov eax, esp
lea ecx, [ebp - 0x3c]
mov dword [eax], str.UTF_8
call fcn.004036e0
mov edx, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test edx, edx
js 0x40571a
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x4054eb
push edx
lea ecx, [ebp - 0x20]
call fcn.004028b0
mov esi, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
push ecx
mov eax, esp
mov dword [ebp - 0x2c], edx
push esi
lea ecx, [ebp - 0x3c]
mov dword [eax], str.UTF_16
call fcn.00403a40
cmp eax, 0xffffffff
jne 0x405511
push dword [esi - 8]
push esi
call fcn.00558711
add esp, 8
test eax, eax
js 0x40571a
cmp eax, dword [esi - 8]
jg 0x40571a
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push ecx
mov eax, esp
lea ecx, [ebp - 0x24]
mov dword [eax], esi
call fcn.00407ed0
add esp, 4
push eax
lea ecx, [ebx + 0x24]
mov byte [ebp - 4], 2
call fcn.0040aff0
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov edx, dword [ebp - 0x24]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405567
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov edx, dword [ebp - 0x38]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405586
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x3c]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4055a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4055c0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx + 0x24]
lea ecx, [ebx + 0x24]
mov esi, dword [ebp - 0x1c]
cmp dword [eax - 0xc], 0
jne 0x4055f4
cmp byte [esi], 0x3c
jne 0x4055f4
push 5
push str.UTF_8
call fcn.004029a0
push esi
call fcn.0040df18
mov al, byte [ebp - 0x11]
add esp, 4
jmp 0x4056c4
mov esi, dword [ebp - 0x1c]
push esi
call fcn.0040df18
mov al, byte [ebp - 0x11]
add esp, 4
jmp 0x4056c4
test cl, 0x20
je 0x4056cc
test cl, 0x40
je 0x40562d
push 2
push 0
push eax
call fcn.0055a5cc
add esp, 0xc
push dword [ebx]
call fcn.00558eb9
add esp, 4
mov dword [ebx + 0x10], eax
xor esi, esi
cmp dword [0x5db938], esi
je 0x4056cc
mov ecx, dword [ebx + 4]
xor eax, eax
test dword [eax + 0x5db944], ecx
jne 0x405658
inc esi
mov eax, esi
shl eax, 4
cmp dword [eax + 0x5db938], edi
jne 0x405640
jmp 0x4056cc
shl esi, 4
mov edi, dword [esi + 0x5db93c]
cmp edi, 2
jne 0x405669
mov dword [ebx + 0x18], edi
mov edx, dword [esi + 0x5db940]
lea eax, [ebx + 0x24]
test edx, edx
jne 0x40567a
xor ecx, ecx
jmp 0x405695
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x24], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405682
sub ecx, dword [ebp - 0x24]
lea eax, [ebx + 0x24]
sar ecx, 1
push ecx
push edx
mov ecx, eax
call fcn.004029a0
cmp dword [ebx + 0x10], 0
je 0x4056a8
xor edi, edi
jmp 0x4056cc
push dword [ebx]
push 1
push edi
push dword [esi + 0x5db938]
call fcn.0055a83b
add esp, 0x10
cmp eax, 1
sete al
mov byte [ebp - 0x11], al
test al, al
je 0x405325
test byte [ebx + 4], 0x40
je 0x4056d7
mov eax, dword [ebx + 0x10]
jmp 0x4056d9
mov eax, edi
mov dword [ebx + 0x14], eax
test edi, edi
je 0x405703
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
mov esi, esp
lea ecx, [ebx + 0x20]
mov dword [eax], 0
mov dword [esi], 0x5b9ad0
call fcn.00403520
add esp, 0x10
mov al, byte [ebp - 0x11]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.00401ca0
push 0x80004005
call fcn.00401ca0
int3