Function at 0x402270
Capabilities:
Encrypt data using rc4 ksa
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x424
mov eax, dword [0x436ebc]
push esi
mov dword [esp + 0x424], eax
push edi
lea eax, [esp + 0x50]
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, esi
call fcn.00401190
mov ecx, dword [esp + 0x430]
push ecx
lea edi, [esi + 0x48]
push edi
call fcn.0041a7da
add esp, 8
push 0
push 0x20
push 3
push 0
push 0
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esi + 0x24], eax
jne 0x4022e3
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x420]
call fcn.00419ef4
add esp, 0x424
ret 4
push ebx
lea ecx, [esi + 0x4fe4]
push ecx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [esi + 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea edx, [esp + 0x14]
push edx
push 0x20
lea edi, [esi + 0x448]
push edi
push eax
mov dword [esi + 0x20], 0
call ebx
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x10]
push 9
add edx, ecx
push str.ADCLABFFS
push edi
mov dword [esi + 0x20], edx
call fcn.0041a6b0
mov edx, dword [esi + 0x24]
add esp, 0xc
test eax, eax
je 0x40235d
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x420]
call fcn.00419ef4
add esp, 0x424
ret 4
push ebp
push 0
lea eax, [esp + 0x18]
push eax
push 0x34
lea ecx, [esi + 0x468]
push ecx
push edx
call ebx
fld qword [esi + 0x490]
mov ecx, dword [esi + 0x20]
fstp dword [esi + 0x4ff0]
mov eax, dword [esp + 0x14]
add ecx, eax
mov dword [esi + 0x20], ecx
mov edi, ecx
movsx ecx, byte [esi + 0x498]
push 0x42f4dc
mov dword [esi + 0x38], ecx
mov ebp, dword [0x4405b8]
push str.Debug.txt
call fcn.0041a059
push edi
push edi
push str._File_Head_length_
push str._s_d__x__n
push eax
mov dword [ebp], eax
call fcn.00419f9f
mov edx, dword [ebp]
push edx
call fcn.00419f4e
mov eax, dword [esi + 0x38]
add esp, 0x20
dec eax
mov edi, 1
je 0x402b0c
sub eax, 5
jne 0x402d07
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 0x18]
push eax
push 0x66
lea ecx, [esi + 0x1918]
push ecx
push edx
mov dword [esi + 0x30], edi
call ebx
mov ecx, dword [esi + 0x20]
mov eax, dword [esp + 0x14]
add ecx, eax
mov dword [esi + 0x20], ecx
xor ecx, ecx
mov cl, byte [esi + 0x193c]
and ecx, 4
push ecx
mov ecx, dword [0x4405b8]
push 0x42f934
call fcn.004010b0
mov ecx, dword [esi + 0x24]
push 0
lea edx, [esp + 0x18]
push edx
push 0x126
lea eax, [esi + 0x197e]
push eax
push ecx
call ebx
mov edx, dword [esp + 0x14]
add dword [esi + 0x20], edx
movsx ecx, byte [esi + 0x193d]
mov eax, ecx
cdq
idiv dword [esi + 0x30]
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x34], eax
test byte [esi + 0x193c], 4
je 0x402466
lea eax, [ecx + ecx]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x2c]
xor edi, edi
test eax, eax
jle 0x40255b
lea ecx, [esi + 0x193e]
mov dword [esp + 0x10], ecx
lea ebp, [esi + 0x53f8]
lea ecx, [esi + 0x4f0]
lea esp, [esp]
mov edx, dword [esp + 0x10]
xor eax, eax
mov ax, word [edx]
test al, al
lea ebx, [edi + 1]
mov dword [ecx], ebx
je 0x4024ad
lea edx, [eax + 1]
and edx, 0xff
mov dword [ecx], edx
mov dl, byte [esi + 0x193c]
fld dword [esi + 0x1a1c]
test dl, 4
je 0x402509
mov eax, edi
cdq
sub eax, edx
sar eax, 1
and edi, 0x80000001
lea eax, [esi + eax*2 + 0x193e]
jns 0x4024d9
dec edi
or edi, 0xfffffffe
inc edi
xor edx, edx
mov dl, byte [eax]
and edx, 0xff
test edi, edi
lea edx, [edi + edx*2 + 1]
mov dword [ecx], edx
jne 0x4024fb
mov al, byte [eax + 1]
and al, 3
movsx ax, al
mov dword [ebp], edi
jmp 0x402516
movsx eax, word [eax]
sar eax, 0xb
and eax, 3
mov dword [ebp], edi
jmp 0x402516
sar eax, 8
and eax, 3
mov dword [ebp], 0
movzx eax, ax
mov edx, dword [esi + eax*4 + 0x19ac]
test edx, edx
fild dword [esi + eax*4 + 0x19ac]
jge 0x402531
fadd dword [0x42f930]
fdivp st(1)
mov dword [ebp - 0x400], eax
add dword [esp + 0x10], 2
mov edi, ebx
add ebp, 4
add ecx, 0x14
fld st(0)
fchs
fstp qword [ecx - 0x10]
fstp qword [ecx - 8]
mov eax, dword [esi + 0x2c]
cmp edi, eax
jl 0x402490
mov eax, dword [esi + 0x2c]
xor ebx, ebx
test eax, eax
jle 0x4025c5
lea ebp, [esi + 0x4ff8]
lea edi, [esi + 0x193e]
movzx eax, word [edi]
mov ecx, dword [ebp]
push ecx
mov edx, eax
shr edx, 0xb
mov ecx, eax
and edx, 3
push edx
shr ecx, 8
and ecx, 3
push ecx
and eax, 0xff
push eax
lea edx, [esp + 0x94]
push str.Chan._02d_K1_d_K2_d_NGain_d
push edx
call fcn.0041a741
mov ecx, dword [0x4405b8]
add esp, 0x18
lea eax, [esp + 0x84]
push eax
call fcn.00401000
mov eax, dword [esi + 0x2c]
inc ebx
add edi, 2
add ebp, 4
cmp ebx, eax
jl 0x402570
lea ecx, [esp + 0x84]
push str.Kdev
push ecx
call fcn.0041a7da
add esp, 8
lea ebx, [esp + 0x8e]
lea edi, [esi + 0x19a8]
mov ebp, 5
lea esp, [esp]
mov edx, dword [edi]
push edx
push str.__5u
push ebx
call fcn.0041a741
add esp, 0xc
add edi, 4
add ebx, 0xc
dec ebp
jne 0x4025f0
mov edi, dword [0x4405b8]
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebp, [edi + 0x204]
call fcn.0041a06c
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea ecx, [esp + 0x98]
push ecx
push 0
push 0
call ebx
lea edx, [esp + 0x84]
push edx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov eax, dword [edi]
push eax
call fcn.00419f4e
fld dword [esi + 0x1a1c]
add esp, 0x14
fstp qword [esp]
lea ecx, [esp + 0x8c]
push str.ADC_Range____8.3f
push ecx
call fcn.0041a741
mov edi, dword [0x4405b8]
add esp, 0x10
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call ebx
lea ecx, [esp + 0x84]
push ecx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov edx, dword [edi]
push edx
call fcn.00419f4e
lea eax, [esp + 0xa0]
push str.K1cal
push eax
call fcn.0041a7da
add esp, 0x24
lea ebp, [esp + 0x90]
lea edi, [esi + 0x19d0]
mov dword [esp + 0x10], 5
fld dword [edi]
sub esp, 8
fstp qword [esp]
push str.__8.3f
push ebp
call fcn.0041a741
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebp, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x402735
mov edi, dword [0x4405b8]
push 0
lea ecx, [esp + 0x88]
push 0
push ecx
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea edx, [esp + 0x98]
push edx
push 0
push 0
call ebx
lea eax, [esp + 0x84]
push eax
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov ecx, dword [edi]
push ecx
call fcn.00419f4e
lea edx, [esp + 0xa0]
push str.B1cal
push edx
call fcn.0041a7da
add esp, 0x24
lea ebp, [esp + 0x90]
lea edi, [esi + 0x19bc]
mov dword [esp + 0x10], 5
fld dword [edi]
sub esp, 8
fstp qword [esp]
push str.__8.3f
push ebp
call fcn.0041a741
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebp, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x4027f3
mov edi, dword [0x4405b8]
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea ecx, [esp + 0x98]
push ecx
push 0
push 0
call ebx
lea edx, [esp + 0x84]
push edx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov eax, dword [edi]
push eax
call fcn.00419f4e
lea ecx, [esp + 0xa0]
push str.K2cal
push ecx
call fcn.0041a7da
add esp, 0x24
lea ebp, [esp + 0x90]
lea edi, [esi + 0x19f8]
mov dword [esp + 0x10], 5
fld dword [edi]
sub esp, 8
fstp qword [esp]
push str.__8.3f
push ebp
call fcn.0041a741
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebp, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x4028b1
mov edi, dword [0x4405b8]
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call ebx
lea ecx, [esp + 0x84]
push ecx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov edx, dword [edi]
push edx
call fcn.00419f4e
lea eax, [esp + 0xa0]
push str.B2cal
push eax
call fcn.0041a7da
add esp, 0x24
lea ebp, [esp + 0x90]
lea edi, [esi + 0x19e4]
mov dword [esp + 0x10], 5
nop
fld dword [edi]
sub esp, 8
fstp qword [esp]
push str.__8.3f
push ebp
call fcn.0041a741
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebp, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x402970
mov edi, dword [0x4405b8]
push 0
lea ecx, [esp + 0x88]
push 0
push ecx
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea edx, [esp + 0x98]
push edx
push 0
push 0
call ebx
lea eax, [esp + 0x84]
push eax
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov ecx, dword [edi]
push ecx
call fcn.00419f4e
add esp, 0x1c
push 0
lea edx, [esp + 0x18]
push edx
lea ebp, [esi + 0x5804]
or eax, 0xffffffff
push 0xc
mov ecx, 0x800
mov edi, ebp
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x24]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebp
push eax
call edi
push 8
push 0x42f50c
push ebp
call fcn.0041a6b0
add esp, 0xc
test eax, eax
je 0x402a58
mov ecx, dword [esi + 0x24]
push 1
push 0
push 0xfffffffffffffff4
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x402d07
mov dword [esi + 0x7804], 0xc
mov edx, dword [esi + 0x580c]
mov dword [esi + 0x7818], edx
test byte [esi + 0x580c], 2
je 0x402ab8
mov ecx, dword [esi + 0x2c]
push 0
lea eax, [esp + 0x18]
push eax
lea edx, [ecx*4 + 4]
mov ecx, dword [esi + 0x24]
push edx
lea eax, [esi + 0x5810]
push eax
push ecx
call edi
mov edx, dword [esi + 0x2c]
mov ecx, dword [esi + 0x20]
lea eax, [edx*4 + 4]
mov edx, dword [esi + 0x7804]
add edx, eax
mov eax, edx
add ecx, eax
mov dword [esi + 0x7804], edx
mov dword [esi + 0x20], ecx
test byte [esi + 0x580c], 4
je 0x402d07
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x7804]
push 0
lea ecx, [esp + 0x18]
push ecx
shl edx, 2
push edx
mov edx, dword [esi + 0x24]
lea ecx, [eax + esi + 0x5804]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x2c]
mov edx, dword [esi + 0x7804]
mov ecx, dword [esi + 0x20]
shl eax, 2
add edx, eax
add ecx, eax
mov dword [esi + 0x7804], edx
mov dword [esi + 0x20], ecx
jmp 0x402d07
mov eax, dword [esi + 0x48c]
mov ecx, eax
and ecx, 0x1ff
sar eax, 0x10
mov dword [esi + 0x30], eax
mov eax, ecx
push eax
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x48c], ecx
mov ecx, dword [0x4405b8]
push 0x42f84c
call fcn.004010b0
mov eax, dword [esi + 0x30]
test eax, eax
je 0x402b54
mov ecx, dword [0x4405b8]
push eax
push 0x42f834
call fcn.004010b0
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x402b5e
mov dword [esi + 0x30], edi
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
cdq
idiv ecx
test ecx, ecx
mov dword [esi + 0x34], eax
je 0x402b7f
mov ecx, dword [0x4405b8]
push eax
push 0x42f818
call fcn.004010b0
movsx ecx, byte [esi + 0x49b]
push ecx
mov ecx, dword [0x4405b8]
push str.m_mode
call fcn.004010b0
mov eax, dword [esi + 0x2c]
xor ecx, ecx
test eax, eax
jle 0x402bc5
lea eax, [esi + 0x4f4]
fld qword [0x42f808]
inc ecx
fstp qword [eax]
mov dword [eax - 4], ecx
fld qword [0x42f800]
add eax, 0x14
fstp qword [eax - 0xc]
mov edx, dword [esi + 0x2c]
cmp ecx, edx
jl 0x402ba6
mov ecx, dword [esi + 0x24]
push 0
lea edx, [esp + 0x18]
push edx
push 0x18
lea eax, [esp + 0x290]
push eax
push ecx
call ebx
mov edx, dword [esi + 0x24]
push edi
push 0
push 0xffffffffffffffe8
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xe
lea eax, [esp + 0x288]
push 0x42f7f0
push eax
call fcn.0041a6b0
add esp, 0xc
test eax, eax
je 0x402d07
mov eax, dword [esi + 0x24]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x34
lea edx, [esi + 0x49c]
push edx
push eax
call ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [esi + 0x20]
add edx, ecx
mov ecx, dword [esi + 0x24]
push 0
mov dword [esi + 0x20], edx
lea edx, [esp + 0x18]
push edx
push 0x20
lea eax, [esi + 0x4d0]
push eax
push ecx
call ebx
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x2c]
add ecx, edx
xor edi, edi
test eax, eax
mov dword [esi + 0x20], ecx
jle 0x402c87
lea ebp, [esi + 0x4f0]
lea ecx, [ecx]
mov ecx, dword [esi + 0x24]
push 0
lea eax, [esp + 0x18]
push eax
push 0x14
push ebp
push ecx
call ebx
mov eax, dword [esi + 0x20]
mov edx, dword [esp + 0x14]
add eax, edx
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x2c]
inc edi
add ebp, 0x14
cmp edi, eax
jl 0x402c60
or eax, 0xffffffff
lea ebp, [esi + 0x5804]
mov ecx, 0x800
mov edi, ebp
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x48c]
mov edi, dword [esi + 0x4ec]
lea ecx, [ecx + ecx*4]
shl ecx, 2
mov eax, ecx
cdq
cmp edx, edi
jg 0x402ce5
jl 0x402cbc
cmp eax, dword [esi + 0x4e8]
jae 0x402ce5
mov eax, dword [esi + 0x4e8]
mov edx, dword [esi + 0x24]
sub eax, ecx
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
push ebp
push edx
mov dword [esi + 0x7804], eax
call ebx
mov ecx, dword [esi + 0x20]
mov eax, dword [esp + 0x14]
add ecx, eax
mov dword [esi + 0x20], ecx
mov eax, dword [esi + 0x24]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x28
lea edx, [esi + 0x18f0]
push edx
push eax
call ebx
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [esi + 0x20], eax
mov ecx, dword [esi + 0x24]
push 0
lea edx, [esp + 0x18]
push edx
push 0x20
lea eax, [esi + 0x1ac4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esi + 0x20]
mov edx, dword [esp + 0x14]
add eax, edx
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x24]
lea edi, [esi + 0x4fdc]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esi + 0x24]
push 0
push 0
push 0
push 2
push 0
push ecx
mov dword [esi + 0x4fd8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edx, dword [esi + 0x24]
push edx
mov dword [esi + 0x28], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x28]
test eax, eax
jne 0x402d94
push 0xe0
call fcn.004159d0
add esp, 4
push eax
mov eax, dword [esi]
push 0x400
push 0x400
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
xor eax, eax
jmp 0x403773
mov eax, dword [edi]
push 1
cdq
push 0
push edx
push eax
mov dword [esi + 0x18], 0xffffffff
call fcn.0041a0e0
mov ecx, dword [esi + 0x4fd8]
mov ebp, dword [esi + 0x38]
mov edi, edx
xor edx, edx
mov ebx, eax
add ebx, ecx
adc edi, edx
cmp ebp, 1
mov dword [esp + 0x4c], edi
jne 0x402de2
mov eax, dword [esi + 0x20]
xor ecx, ecx
mov edx, ebx
sub edx, eax
push ecx
mov eax, edi
push 4
sbb eax, ecx
push eax
push edx
call fcn.0041a520
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
mov ecx, dword [esi + 0x20]
xor edx, edx
mov eax, ebx
sub eax, ecx
sbb edi, edx
cmp ebp, 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
fild qword [esp + 0x20]
jne 0x402e06
fmul qword [0x42f7e8]
jmp 0x402e0c
fmul qword [0x42f7e0]
sub esp, 8
fstp qword [esp]
lea ecx, [esp + 0x28c]
push str._.0lf_counts_in_a_file_incl._8_bytes_numsect_in_case_2_byte_counts_
push ecx
call fcn.0041a6e9
mov edi, dword [0x4405b8]
push 0x42f4dc
push str.Debug.txt
call fcn.0041a059
lea edx, [esp + 0x29c]
push edx
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov eax, dword [edi]
push eax
call fcn.00419f4e
mov eax, dword [esi + 0x38]
add esp, 0x28
cmp eax, 6
jne 0x403752
movzx ecx, byte [esi + 0x1a9e]
movzx edx, byte [esi + 0x1a9f]
movzx eax, byte [esi + 0x1aa0]
push ecx
movzx ecx, byte [esi + 0x1aa3]
push edx
movzx edx, byte [esi + 0x1aa2]
push eax
movzx eax, byte [esi + 0x1aa1]
push ecx
push edx
push eax
lea ecx, [esp + 0x9c]
push str.Date_from_SD_file___02u._02u._02u_nTime_from_SD_file__02u:_02u:_02u
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [0x4405b8]
add esp, 0x20
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebp, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebp
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x84]
push ecx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebp
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov edx, dword [edi]
push edx
call fcn.00419f4e
mov eax, dword [esp + 0x68]
add esp, 0x1c
xor edi, edi
push edi
push 0x100
push eax
push ebx
call fcn.0041a520
mov ecx, dword [esi + 0x18]
add eax, 0xfffffffe
mov dword [esi + 0x57f8], eax
mov dword [esp + 0x18], edi
dec eax
mov dword [esp + 0x2c], edi
mov edi, dword [esi + 0x20]
shr edi, 1
mov dword [esp + 0x10], eax
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x402f6d
push eax
mov ecx, esi
call fcn.004012b0
mov ecx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], ecx
mov edx, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov edi, dword [edx + edi*2]
cmp edi, 0xffffffff
mov dword [esp + 0x30], edi
jne 0x402f8f
push 0xe1
jmp 0x402d71
mov ebx, dword [esp + 0x10]
mov ebp, dword [esi + 0x20]
mov ecx, ebx
shl ecx, 7
shr ebp, 1
add ebp, ecx
mov ecx, dword [esi + 0x18]
mov eax, ebp
shr eax, 0x1b
cmp eax, ecx
je 0x402fbf
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], edx
test edi, edi
jne 0x402fdf
mov eax, dword [esi + 0x4ff4]
and ebp, 0x7ffffff
cmp dword [eax + ebp*2], 0xffffffff
je 0x402fdf
mov ebx, dword [esp + 0x10]
inc ebx
jmp 0x403146
cmp ebx, 0x10
jbe 0x403092
mov eax, dword [esp + 0x18]
lea esp, [esp]
mov edi, dword [esi + 0x20]
add ebx, eax
shr ebx, 1
mov ecx, ebx
shl ecx, 7
shr edi, 1
add edi, ecx
mov ecx, dword [esi + 0x18]
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x403020
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], edx
mov eax, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov edi, dword [eax + edi*2]
cmp edi, 0xffffffff
je 0x403073
mov ebp, dword [esi + 0x20]
mov ecx, dword [esp + 0x18]
shl ecx, 7
shr ebp, 1
add ebp, ecx
mov ecx, dword [esi + 0x18]
mov eax, ebp
shr eax, 0x1b
cmp eax, ecx
je 0x403062
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], edx
mov eax, dword [esi + 0x4ff4]
and ebp, 0x7ffffff
cmp edi, dword [eax + ebp*2]
jae 0x403079
mov dword [esp + 0x10], ebx
jmp 0x403081
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, ebx
sub ecx, eax
cmp ecx, 0x10
ja 0x402ff0
mov eax, dword [esp + 0x18]
mov edi, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
lea ebx, [eax + 1]
shl eax, 7
shr edi, 1
add edi, eax
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x4030c3
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], edx
mov eax, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov ecx, dword [eax + edi*2]
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
ja 0x40313e
mov ebp, ebx
shl ebp, 7
mov edi, dword [esi + 0x20]
mov edx, dword [esi + 0x18]
shr edi, 1
add edi, ebp
mov eax, edi
shr eax, 0x1b
cmp eax, edx
je 0x40310c
push eax
mov ecx, esi
call fcn.004012b0
mov ecx, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov edi, dword [edx + edi*2]
mov edx, dword [esi + 0x57f8]
mov eax, edi
sub eax, ecx
shr edx, 1
cmp eax, edx
ja 0x40313e
cmp edi, ecx
jb 0x40313e
mov eax, dword [esp + 0x10]
inc ebx
add ebp, 0x80
cmp ebx, eax
jbe 0x4030e1
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x4031b4
mov ebp, dword [esi + 0x20]
xor ecx, ecx
dec ebx
mov eax, ebx
mov edx, 0x80
mul edx
push ecx
shr ebp, 1
xor edi, edi
add ebp, eax
push 0x8000000
adc edi, edx
push edi
push ebp
mov dword [esp + 0x30], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], ebx
call fcn.0041a520
cmp eax, dword [esi + 0x18]
je 0x40318f
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], eax
push 0
push 0x8000000
push edi
push ebp
call fcn.0041a460
mov ecx, dword [esi + 0x4ff4]
mov ebp, dword [ecx + eax*2]
inc ebp
mov dword [esp + 0x18], 0
jmp 0x403276
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
lea edi, [ebx - 1]
shl edi, 7
shr edx, 1
add edi, edx
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x4031e1
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], eax
mov ecx, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov ebp, dword [ecx + edi*2]
mov edi, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
mov edx, ebx
shr edi, 1
shl edx, 7
add edi, edx
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x40321c
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], eax
mov ecx, dword [esi + 0x4ff4]
and edi, 0x7ffffff
mov edi, dword [ecx + edi*2]
mov eax, edi
imul eax, eax, 0x7c
xor edx, edx
div dword [esi + 0x2c]
mov dword [esp + 0x2c], edi
test eax, eax
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
jge 0x40324b
fadd qword [0x42f708]
fdiv dword [esi + 0x4ff0]
fmul qword [0x42f4f0]
call fcn.0041a7f8
sub ebp, edi
mov dword [esp + 0x18], ebx
mov ebx, dword [esi + 0x57f8]
inc ebp
dec ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], ebx
lea edi, [ebp*4]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, eax
mov ecx, edi
mov dword [esi + 8], edx
mov edi, edx
mov edx, ecx
shr ecx, 2
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea eax, [ebp - 1]
cmp ebx, eax
jne 0x4032dc
mov edi, dword [esp + 0x18]
xor ecx, ecx
jmp 0x4032c0
xor edx, edx
lea eax, [ecx + edi]
div dword [esi + 0x57f8]
mov eax, dword [esi + 8]
inc ecx
cmp ecx, ebx
mov dword [eax + ecx*4 - 4], edx
jbe 0x4032c0
jmp 0x40341a
mov eax, dword [esi]
mov ecx, dword [0x44053c]
push eax
push 0x407c60
push eax
push str.PERSENT
push ecx
call dword [sym.imp.USER32.dll_CreateDialogParamW]
push 0xde
mov dword [esi + 4], eax
call fcn.004159d0
mov edx, dword [esi + 4]
add esp, 4
push eax
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
xor eax, eax
inc ebx
cmp ebx, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ebx
jbe 0x403400
test ebx, ebx
mov dword [esp + 0x48], ebx
fild dword [esp + 0x48]
jge 0x40333b
fadd qword [0x42f708]
fstp qword [esp + 0x50]
nop
mov eax, dword [esp + 0x10]
fild dword [esp + 0x10]
test eax, eax
jge 0x403352
fadd qword [0x42f708]
fdiv qword [esp + 0x50]
fmul qword [0x42f6f0]
call fcn.0041a7f8
mov edi, eax
cmp edi, dword [esp + 0x34]
je 0x403392
mov ecx, dword [esi + 4]
push edi
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
push 1
push 0
push 0
push 0
lea edx, [esp + 0x78]
push edx
mov dword [esp + 0x48], edi
call dword [sym.imp.USER32.dll_PeekMessageW]
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
add eax, ecx
xor edx, edx
div dword [esi + 0x57f8]
mov edi, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
shr edi, 1
mov ebx, edx
shl edx, 7
add edi, edx
mov eax, edi
shr eax, 0x1b
cmp eax, ecx
je 0x4033d0
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x4fe0]
mov dword [esi + 0x4ff4], eax
mov ecx, dword [esi + 0x4ff4]
mov eax, dword [esi + 8]
and edi, 0x7ffffff
mov edx, dword [ecx + edi*2]
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
sub edx, edi
mov dword [eax + edx*4], ebx
mov eax, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x403340
mov ecx, dword [esi + 4]
push 0x64
push 1
push 0x400
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [esi + 4], 0
mov eax, dword [esi + 0x57f8]
push eax
push eax
lea edx, [esp + 0x8c]
push str.Number_of_256_bytes_sectors_in_SD_file__10u__08x_
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [0x4405b8]
add esp, 0x10
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebx, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea ecx, [esp + 0x98]
push ecx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edx, [esp + 0x84]
push edx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebx
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov eax, dword [edi]
push eax
call fcn.00419f4e
push ebp
push ebp
lea ecx, [esp + 0xa8]
push str.Number_of_data_sectors_include_holes___10u__08x_
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [0x4405b8]
add esp, 0x2c
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x84]
push ecx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebx
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov edx, dword [edi]
push edx
call fcn.00419f4e
mov eax, dword [esp + 0x4c]
add esp, 0x1c
test eax, eax
jne 0x403553
mov eax, dword [esp + 0x1c]
inc eax
push eax
push eax
push str.Number_of_data_sectors_exclude_holes__10u__08x_
lea eax, [esp + 0x90]
push eax
jmp 0x403566
mov eax, dword [esp + 0x18]
push eax
push eax
push str.The_first_sector_of_cyclebuffer__10u__08x_
lea ecx, [esp + 0x90]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [0x4405b8]
add esp, 0x10
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.0041a06c
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x84]
push ecx
call fcn.0041a06c
push 0x42f4dc
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041a059
push ebx
push 0x42f4cc
push eax
mov dword [edi], eax
call fcn.00419f9f
mov edx, dword [edi]
push edx
call fcn.00419f4e
mov eax, ebp
mov ecx, 0x100
mul ecx
mov ebx, edx
mov edx, dword [esi + 8]
mov edi, eax
mov dword [esi + 0x57fc], ebp
mov eax, dword [edx]
add esp, 0x1c
test eax, eax
je 0x40360d
mov ecx, dword [esi + 0x2c]
imul eax, eax, 0x7c
xor edx, edx
div ecx
sub ecx, edx
jmp 0x40360f
xor ecx, ecx
cmp ecx, dword [esi + 0x2c]
mov dword [esi + 0x5800], ecx
jne 0x403624
mov dword [esi + 0x5800], 0
push 0
push 2
push ebx
push edi
call fcn.0041a520
push 0
push 0x80
mov ebp, edx
mov edi, eax
push ebp
push edi
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
call fcn.0041a460
push 0
push 0x80
push ebp
push edi
mov ebx, eax
call fcn.0041a520
mov ecx, 0x7c
mul ecx
cmp ebx, 4
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
jbe 0x40367b
mov ecx, eax
add ebx, 0xfffffffc
add ecx, ebx
mov eax, edx
adc eax, 0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], eax
movzx ax, byte [esi + 0x1a9e]
movzx cx, byte [esi + 0x1a9f]
xor edx, edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], edx
movzx dx, byte [esi + 0x1aa0]
mov word [esp + 0x40], dx
movzx dx, byte [esi + 0x1aa3]
mov word [esp + 0x44], ax
movzx ax, byte [esi + 0x1aa1]
mov word [esp + 0x42], cx
movzx cx, byte [esi + 0x1aa2]
mov word [esp + 0x3e], ax
lea ebx, [esi + 0x4fe4]
push ebx
lea eax, [esp + 0x3c]
add edx, 0x7d0
push eax
mov word [esp + 0x42], cx
mov word [esp + 0x40], dx
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [esi + 0x4fe8]
push 1
push 0
push 0
push ecx
call fcn.0041a0e0
mov ecx, dword [esp + 0x20]
mov ebp, eax
mov edi, edx
mov edx, dword [ebx]
xor eax, eax
add ebp, edx
adc edi, eax
mov eax, dword [esp + 0x24]
add ebp, ecx
lea ecx, [esp + 0x384]
push ecx
adc edi, eax
call dword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
mov eax, dword [esp + 0x384]
push 0
cdq
push 0x23c34600
push edx
push eax
call fcn.0041a0e0
add ebp, eax
adc edi, edx
mov edx, edi
sar edx, 0x1f
mov dword [esi + 0x4fe8], edi
mov dword [ebx], ebp
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x40]
cdq
push edx
push eax
mov eax, dword [esi + 0x44]
push eax
push ecx
call fcn.0041a520
mov dword [esi + 0x40], eax
mov eax, 1
mov dword [esi + 0x44], edx
mov dword [esi + 0x10], eax
mov ecx, dword [esp + 0x430]
pop ebp
pop ebx
pop edi
pop esi
call fcn.00419ef4
add esp, 0x424
ret 4