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

Disassembly:
push ebp
mov eax, 0x4607c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00516610
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x46040], esi
movzx ebx, byte [edi + 0xcb6]
movzx eax, byte [edi + 0xcb9]
movzx ecx, word [edi + 0xcb4]
movzx edx, word [edi + 0xcb7]
shl ebx, 0x10
shl eax, 0x10
add ecx, ebx
add edx, eax
add ecx, edx
test ecx, ecx
je 0x42d8c0
mov edx, dword [sym.imp.msvcrt.dll__timezone]
mov ebx, dword [ebp + 0xc]
mov esi, dword [edx]
mov ecx, ebx
mov ebx, 0xc22e4507
sub ecx, esi
mov eax, ecx
imul ebx
mov eax, ecx
sar eax, 0x1f
add edx, ecx
sar edx, 0x10
sub edx, eax
mov word [ebp - 0x38], dx
xor eax, eax
movzx esi, word [edi + 0xcb4]
mov word [ebp - 0x36], si
lea esi, [edi + 0xc94]
movzx ebx, byte [edi + 0xcb6]
mov byte [ebp - 0x34], bl
lea ebx, [edi + 0xca4]
movzx edx, word [edi + 0xcb7]
mov word [ebp - 0x33], dx
lea edx, [edi + 0xca8]
movzx ecx, byte [edi + 0xcb9]
mov dword [ebp - 0x46044], eax
mov dword [ebp - 0x46050], esi
mov dword [ebp - 0x46054], ebx
mov byte [ebp - 0x31], cl
lea ecx, [edi + 0xc98]
mov dword [ebp - 0x46060], edx
mov dword [ebp - 0x46064], ecx
mov ecx, dword [ebp - 0x46050]
xor eax, eax
xor ebx, ebx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0045c160
test eax, eax
jne 0x42d946
mov esi, dword [ebp - 0x46044]
xor edx, edx
mov eax, dword [ebp - 0x46054]
mov dword [esp + 4], edx
mov word [ebp + esi*2 - 0x30], bx
mov dword [esp], eax
call fcn.0045c160
test eax, eax
jne 0x42d8d1
add dword [ebp - 0x46064], 4
mov eax, dword [ebp - 0x46044]
add dword [ebp - 0x46060], 4
mov word [ebp + eax*2 - 0x2a], bx
inc eax
cmp eax, 2
mov dword [ebp - 0x46044], eax
jle 0x42d635
mov ecx, dword [edi + 0xcba]
mov dword [ebp - 0x24], ecx
mov edx, dword [edi + 0xcbe]
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x20], edx
test edi, edi
je 0x42d6de
mov eax, dword [ebp - 0x38]
mov esi, dword [ebp + 0x18]
mov dword [esi], eax
mov ebx, dword [ebp - 0x34]
mov dword [esi + 4], ebx
mov edi, dword [ebp - 0x30]
mov dword [esi + 8], edi
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0xc], eax
mov ebx, dword [ebp - 0x28]
mov dword [esi + 0x14], ecx
mov dword [esi + 0x18], edx
mov dword [esi + 0x10], ebx
mov ecx, dword [ebp + 0x10]
xor esi, esi
mov edx, 0x532d35
mov dword [ebp - 0x46048], esi
mov dword [esp + 4], edx
mov dword [esp], ecx
call sym._fopen
test eax, eax
mov ebx, eax
je 0x42d733
mov dword [esp + 0xc], eax
mov ecx, 1
mov eax, 4
mov dword [esp + 8], ecx
lea edi, [ebp - 0x4603c]
mov dword [esp + 4], eax
mov dword [esp], edi
call sym._fread
dec eax
je 0x42d9d5
mov dword [esp], ebx
call sym._fclose
mov esi, dword [ebp - 0x46048]
mov ebx, dword [ebp - 0x46048]
mov edi, dword [ebp - 0x38]
shl esi, 3
sub esi, ebx
lea eax, [ebp + esi*4 - 0x18]
mov dword [eax - 0x46020], edi
lea esi, [eax - 0x46020]
mov edx, dword [ebp - 0x34]
mov dword [esi + 4], edx
mov ecx, dword [ebp - 0x30]
mov dword [esi + 8], ecx
mov ebx, dword [ebp - 0x2c]
mov ecx, 0x532d47
mov dword [esi + 0xc], ebx
mov edi, dword [ebp - 0x28]
mov ebx, dword [ebp + 0x10]
mov dword [esi + 0x10], edi
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x14], eax
mov edx, dword [ebp - 0x20]
mov dword [esi + 0x18], edx
mov dword [esp + 4], ecx
mov dword [esp], ebx
call sym._fopen
test eax, eax
mov esi, eax
je 0x42d7f8
mov dword [esp + 0xc], eax
mov ecx, 0xff8901a8
mov ebx, 1
mov dword [ebp - 0x4603c], ecx
lea eax, [ebp - 0x4603c]
mov edi, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._fwrite
mov dword [esp + 0xc], esi
mov ebx, dword [ebp - 0x46048]
mov edx, 0x1c
mov dword [esp + 4], edx
lea ecx, [ebp - 0x46038]
mov dword [esp], ecx
inc ebx
mov dword [esp + 8], ebx
call sym._fwrite
mov dword [esp], esi
call sym._fclose
mov dword [ebp - 0x46040], ebx
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x42d8c0
mov edi, dword [ebp + 0x14]
mov byte [edi + 5], 0
mov byte [edi + 4], 0
mov eax, dword [ebp - 0x46048]
mov ebx, dword [ebp - 0x46048]
sub eax, 5
mov edx, eax
sub ebx, 0xa
mov dword [ebp - 0x46058], ebx
not edx
mov edi, ebx
mov dword [ebp - 0x4605c], eax
sar edx, 0x1f
not ebx
mov esi, eax
sar ebx, 0x1f
and esi, edx
xor edx, edx
and edi, ebx
cmp edx, dword [ebp - 0x46048]
jge 0x42d8c0
lea ecx, [ebp - 0x46038]
cmp dword [ebp - 0x46058], edx
jg 0x42d880
movzx eax, word [ecx + 0x10]
cmp word [ecx + 0xa], ax
jbe 0x42d880
mov ebx, dword [ebp + 0x14]
movzx eax, byte [ebx + 5]
mov bl, al
add bl, 2
cmp edx, edi
je 0x42d9c8
mov eax, dword [ebp + 0x14]
mov byte [eax + 5], bl
lea esi, [esi]
cmp dword [ebp - 0x4605c], edx
jg 0x42d8b0
movzx ebx, word [ecx + 0x10]
cmp word [ecx + 0xa], bx
jbe 0x42d8b0
mov ebx, dword [ebp + 0x14]
movzx eax, byte [ebx + 4]
mov bl, al
add bl, 2
cmp edx, esi
je 0x42d9bb
mov eax, dword [ebp + 0x14]
mov byte [eax + 4], bl
lea esi, [esi]
inc edx
add ecx, 0x1c
cmp edx, dword [ebp - 0x46048]
jl 0x42d850
lea esi, [esi]
mov eax, dword [ebp - 0x46040]
add esp, 0x4607c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x46060]
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.0045c160
test eax, eax
je 0x42d67a
mov edx, dword [ebp - 0x46060]
mov ebx, 0x3e8
mov dword [esp], edx
call method.MWORD.GetValue___const
mov dword [ebp - 0x4606c], edx
mov dword [ebp - 0x46070], eax
mul ebx
mov ebx, eax
imul eax, dword [ebp - 0x4606c], 0x3e8
lea esi, [edx + eax]
mov edx, dword [ebp - 0x46054]
mov dword [esp], edx
call method.MWORD.GetValue___const
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 4], esi
call sym.___udivdi3
mov ebx, eax
jmp 0x42d67a
mov esi, dword [ebp - 0x46064]
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.0045c160
test eax, eax
je 0x42d653
mov ecx, dword [ebp - 0x46064]
mov ebx, 0x3e8
mov dword [esp], ecx
call method.MWORD.GetValue___const
mov dword [ebp - 0x4606c], edx
mov ecx, dword [ebp - 0x46050]
mov dword [ebp - 0x46070], eax
mul ebx
mov dword [esp], ecx
mov ebx, eax
imul eax, dword [ebp - 0x4606c], 0x3e8
lea esi, [edx + eax]
call method.MWORD.GetValue___const
mov dword [esp + 8], eax
mov dword [esp], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 4], esi
call sym.___udivdi3
mov ebx, eax
jmp 0x42d653
mov ebx, dword [ebp + 0x14]
add al, 3
mov byte [ebx + 4], al
jmp 0x42d8b0
mov ebx, dword [ebp + 0x14]
add al, 3
mov byte [ebx + 5], al
jmp 0x42d880
mov edx, dword [ebp - 0x4603c]
lea esi, [edx + 0x76fe59]
cmp esi, 1
ja 0x42d72b
mov dword [esp], ebx
xor ecx, ecx
cmp edx, 0xff8901a7
setne cl
mov edi, 2
xor edx, edx
mov dword [esp + 4], edx
lea eax, [ecx*8 + 0x14]
mov dword [esp + 8], edi
mov dword [ebp - 0x46068], eax
call sym._fseek
mov dword [esp], ebx
call sym._ftell
mov dword [esp], ebx
sub eax, 4
xor edx, edx
div dword [ebp - 0x46068]
xor ecx, ecx
mov dword [esp + 8], ecx
lea esi, [eax - 0x1ff]
mov edi, esi
not edi
sar edi, 0x1f
and edi, esi
sub eax, edi
mov dword [ebp - 0x46048], eax
mov eax, dword [ebp - 0x46068]
imul edi, eax
add edi, 4
mov dword [esp + 4], edi
call sym._fseek
mov edx, dword [ebp - 0x46048]
test edx, edx
je 0x42d72b
cmp dword [ebp - 0x46068], 0x1c
je 0x42db9d
xor eax, eax
mov ecx, 0x46000
lea esi, [ebp - 0x46038]
mov dword [esp + 8], ecx
xor edi, edi
mov dword [esp + 4], eax
mov dword [esp], esi
call sym._memset
cmp edi, dword [ebp - 0x46048]
jge 0x42dad1
mov dword [esp + 0xc], ebx
mov edx, dword [ebp - 0x46068]
mov eax, 1
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 4], edx
call sym._fread
dec eax
jne 0x42dad1
inc edi
add esi, 0x1c
cmp edi, dword [ebp - 0x46048]
jl 0x42daa3
xor esi, esi
mov dword [ebp - 0x4604c], esi
mov esi, 1
cmp esi, edi
jge 0x42db69
lea edx, [ebp + 4]
lea ecx, [ebp - 0x18]
movzx eax, word [ecx - 0x46020]
cmp word [edx - 0x46020], ax
jbe 0x42db61
inc dword [ebp - 0x4604c]
add ecx, 0x1c
cmp dword [ebp - 0x4604c], esi
je 0x42db61
mov eax, dword [edx - 0x46020]
mov dword [ecx - 0x46020], eax
mov eax, dword [edx - 0x4601c]
mov dword [ecx - 0x4601c], eax
mov eax, dword [edx - 0x46018]
mov dword [ecx - 0x46018], eax
mov eax, dword [edx - 0x46014]
mov dword [ecx - 0x46014], eax
mov eax, dword [edx - 0x46010]
mov dword [ecx - 0x46010], eax
mov eax, dword [edx - 0x4600c]
mov dword [ecx - 0x4600c], eax
mov eax, dword [edx - 0x46008]
mov dword [ecx - 0x46008], eax
inc esi
add edx, 0x1c
cmp esi, edi
jl 0x42daec
mov edx, dword [ebp - 0x4604c]
test edx, edx
js 0x42db91
lea edi, [edx*8]
mov ecx, dword [ebp - 0x38]
sub edi, edx
lea eax, [ebp + edi*4 - 0x46038]
cmp cx, word [eax]
ja 0x42db91
sub eax, 0x1c
dec edx
jns 0x42db86
inc edx
mov dword [ebp - 0x46048], edx
jmp 0x42d72b
mov dword [esp + 0xc], ebx
mov edi, dword [ebp - 0x46048]
mov edx, 0x1c
mov dword [esp + 4], edx
lea esi, [ebp - 0x46038]
mov dword [esp], esi
mov dword [esp + 8], edi
call sym._fread
mov edi, eax
jmp 0x42dad1