Function at 0x402030
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 [0x42ea5c]
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.00412e5e
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 0x4020a3
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x420]
call fcn.00412538
add esp, 0x424
ret 4
push ebp
lea ecx, [esi + 0x1af4]
push ecx
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileTime]
mov eax, dword [esi + 0x24]
mov ebp, 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 ebp
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.00412cf0
mov edx, dword [esi + 0x24]
add esp, 0xc
test eax, eax
je 0x40211d
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x420]
call fcn.00412538
add esp, 0x424
ret 4
push ebx
push 0
lea eax, [esp + 0x18]
push eax
push 0x34
lea ecx, [esi + 0x468]
push ecx
push edx
call ebp
fld qword [esi + 0x490]
mov ecx, dword [esi + 0x20]
fstp dword [esi + 0x1b00]
mov eax, dword [esp + 0x14]
add ecx, eax
mov dword [esi + 0x20], ecx
mov edi, ecx
movsx ecx, byte [esi + 0x498]
push 0x4274ac
mov dword [esi + 0x38], ecx
mov ebx, dword [0x42f9e4]
push str.Debug.txt
call fcn.0041269d
push edi
push edi
push str._File_Head_length_
push str._s_d__x__n
push eax
mov dword [ebx], eax
call fcn.004125e3
mov edx, dword [ebx]
push edx
call fcn.00412592
mov eax, dword [esi + 0x38]
add esp, 0x20
dec eax
je 0x4027c2
sub eax, 5
jne 0x4029e8
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], 1
call ebp
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 [0x42f9e4]
push 0x42790c
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 ebp
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 0x402223
lea eax, [ecx + ecx]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x2c]
xor edi, edi
test eax, eax
jle 0x402311
lea ecx, [esi + 0x193e]
mov dword [esp + 0x10], ecx
lea ebp, [esi + 0x1f08]
lea ecx, [esi + 0x4f0]
mov edx, dword [esp + 0x10]
xor eax, eax
mov ax, word [edx]
test al, al
lea ebx, [edi + 1]
mov dword [ecx], ebx
je 0x402263
lea edx, [eax + 1]
and edx, 0xff
mov dword [ecx], edx
mov dl, byte [esi + 0x193c]
fld dword [esi + 0x1a1c]
test dl, 4
je 0x4022bf
mov eax, edi
cdq
sub eax, edx
sar eax, 1
and edi, 0x80000001
lea eax, [esi + eax*2 + 0x193e]
jns 0x40228f
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 0x4022b1
mov al, byte [eax + 1]
and al, 3
movsx ax, al
mov dword [ebp], edi
jmp 0x4022cc
movsx eax, word [eax]
sar eax, 0xb
and eax, 3
mov dword [ebp], edi
jmp 0x4022cc
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 0x4022e7
fadd dword [0x427908]
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 0x402246
mov eax, dword [esi + 0x2c]
xor ebp, ebp
test eax, eax
jle 0x40237a
lea ebx, [esi + 0x1b08]
lea edi, [esi + 0x193e]
movzx eax, word [edi]
mov ecx, dword [ebx]
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.00412dc5
mov ecx, dword [0x42f9e4]
add esp, 0x18
lea eax, [esp + 0x84]
push eax
call fcn.00401000
mov eax, dword [esi + 0x2c]
inc ebp
add edi, 2
add ebx, 4
cmp ebp, eax
jl 0x402326
lea ecx, [esp + 0x84]
push str.Kdev
push ecx
call fcn.00412e5e
add esp, 8
lea ebx, [esp + 0x8e]
lea edi, [esi + 0x19a8]
mov ebp, 5
mov edx, dword [edi]
push edx
push str.__5u
push ebx
call fcn.00412dc5
add esp, 0xc
add edi, 4
add ebx, 0xc
dec ebp
jne 0x4023a1
mov edi, dword [0x42f9e4]
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebx, [edi + 0x204]
call fcn.004126b0
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea ecx, [esp + 0x98]
push ecx
push 0
push 0
call ebp
lea edx, [esp + 0x84]
push edx
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov eax, dword [edi]
push eax
call fcn.00412592
fld dword [esi + 0x1a1c]
add esp, 0x14
fstp qword [esp]
lea ecx, [esp + 0x8c]
push str.ADC_Range____8.3f
push ecx
call fcn.00412dc5
mov edi, dword [0x42f9e4]
add esp, 0x10
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.004126b0
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call ebp
lea ecx, [esp + 0x84]
push ecx
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov edx, dword [edi]
push edx
call fcn.00412592
lea eax, [esp + 0xa0]
push str.K1cal
push eax
call fcn.00412e5e
add esp, 0x24
lea ebx, [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 ebx
call fcn.00412dc5
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebx, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x4024e6
mov edi, dword [0x42f9e4]
push 0
lea ecx, [esp + 0x88]
push 0
push ecx
lea ebx, [edi + 0x204]
call fcn.004126b0
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea edx, [esp + 0x98]
push edx
push 0
push 0
call ebp
lea eax, [esp + 0x84]
push eax
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov ecx, dword [edi]
push ecx
call fcn.00412592
lea edx, [esp + 0xa0]
push str.B1cal
push edx
call fcn.00412e5e
add esp, 0x24
lea ebx, [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 ebx
call fcn.00412dc5
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebx, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x4025a4
mov edi, dword [0x42f9e4]
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebx, [edi + 0x204]
call fcn.004126b0
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea ecx, [esp + 0x98]
push ecx
push 0
push 0
call ebp
lea edx, [esp + 0x84]
push edx
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov eax, dword [edi]
push eax
call fcn.00412592
lea ecx, [esp + 0xa0]
push str.K2cal
push ecx
call fcn.00412e5e
add esp, 0x24
lea ebx, [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 ebx
call fcn.00412dc5
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebx, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x402662
mov edi, dword [0x42f9e4]
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.004126b0
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea eax, [esp + 0x98]
push eax
push 0
push 0
call ebp
lea ecx, [esp + 0x84]
push ecx
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov edx, dword [edi]
push edx
call fcn.00412592
lea eax, [esp + 0xa0]
push str.B2cal
push eax
call fcn.00412e5e
add esp, 0x24
lea ebx, [esp + 0x90]
lea edi, [esi + 0x19e4]
mov dword [esp + 0x10], 5
fld dword [edi]
sub esp, 8
fstp qword [esp]
push str.__8.3f
push ebx
call fcn.00412dc5
mov eax, dword [esp + 0x20]
add esp, 0x10
add edi, 4
add ebx, 0x10
dec eax
mov dword [esp + 0x10], eax
jne 0x402720
mov edi, dword [0x42f9e4]
push 0
lea ecx, [esp + 0x88]
push 0
push ecx
lea ebx, [edi + 0x204]
call fcn.004126b0
add esp, 4
inc eax
push eax
push ebx
push 0xffffffffffffffff
lea edx, [esp + 0x98]
push edx
push 0
push 0
call ebp
lea eax, [esp + 0x84]
push eax
call fcn.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov ecx, dword [edi]
push ecx
call fcn.00412592
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 0x1c
jmp 0x4029e8
mov eax, dword [esi + 0x48c]
mov ecx, eax
and ecx, 0x1ff
mov edx, ecx
sar eax, 0x10
push edx
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x30], eax
mov dword [esi + 0x48c], ecx
mov ecx, dword [0x42f9e4]
push 0x427824
call fcn.004010b0
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40280a
mov ecx, dword [0x42f9e4]
push eax
push 0x42780c
call fcn.004010b0
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x402818
mov dword [esi + 0x30], 1
mov eax, dword [esi + 0x2c]
mov ecx, dword [esi + 0x30]
cdq
idiv ecx
test ecx, ecx
mov dword [esi + 0x34], eax
je 0x402839
mov ecx, dword [0x42f9e4]
push eax
push 0x4277f0
call fcn.004010b0
movsx eax, byte [esi + 0x49b]
mov ecx, dword [0x42f9e4]
push eax
push str.m_mode
call fcn.004010b0
mov eax, dword [esi + 0x2c]
xor ecx, ecx
test eax, eax
jle 0x40287f
lea eax, [esi + 0x4f4]
fld qword [0x4277e0]
inc ecx
fstp qword [eax]
mov dword [eax - 4], ecx
fld qword [0x4277d8]
add eax, 0x14
fstp qword [eax - 0xc]
mov edx, dword [esi + 0x2c]
cmp ecx, edx
jl 0x402860
mov eax, dword [esi + 0x24]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x18
lea edx, [esp + 0x290]
push edx
push eax
call ebp
mov ecx, dword [esi + 0x24]
push 1
push 0
push 0xffffffffffffffe8
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0xe
lea edx, [esp + 0x288]
push str.SAMPLES_RECORD
push edx
call fcn.00412cf0
add esp, 0xc
test eax, eax
je 0x4029e8
mov edx, dword [esi + 0x24]
push 0
lea eax, [esp + 0x18]
push eax
push 0x34
lea ecx, [esi + 0x49c]
push ecx
push edx
call ebp
mov eax, dword [esp + 0x14]
mov ebx, dword [esi + 0x20]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x20
add ebx, eax
mov eax, dword [esi + 0x24]
lea edx, [esi + 0x4d0]
push edx
push eax
mov dword [esi + 0x20], ebx
call ebp
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x14]
mov eax, dword [esi + 0x2c]
add edx, ecx
xor ebx, ebx
test eax, eax
mov dword [esi + 0x20], edx
jle 0x402968
lea edi, [esi + 0x4f0]
jmp 0x402920
mov eax, dword [esi + 0x24]
push 0
lea edx, [esp + 0x18]
push edx
push 0x14
push edi
push eax
call ebp
mov edx, dword [esi + 0x20]
mov ecx, dword [esp + 0x14]
add edx, ecx
mov dword [esi + 0x20], edx
fld qword [edi + 0xc]
mov edx, dword [edi]
sub esp, 8
fstp qword [esp]
push edx
lea eax, [esp + 0x290]
push 0x4277c0
push eax
call fcn.00412d6d
mov eax, dword [esi + 0x2c]
add esp, 0x14
inc ebx
add edi, 0x14
cmp ebx, eax
jl 0x402920
or eax, 0xffffffff
lea ebx, [esi + 0x2314]
mov ecx, 0x400
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [esi + 0x48c]
mov edi, dword [esi + 0x4ec]
lea ecx, [eax + eax*4]
shl ecx, 2
mov eax, ecx
cdq
cmp edx, edi
jg 0x4029c6
jl 0x40299d
cmp eax, dword [esi + 0x4e8]
jae 0x4029c6
mov eax, dword [esi + 0x4e8]
mov edx, dword [esi + 0x24]
sub eax, ecx
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
push ebx
push edx
mov dword [esi + 0x3314], eax
call ebp
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 ebp
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 ebp
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 + 0x1aec]
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 + 0x1ae8], 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 0x402a71
push 0xe0
call fcn.004060c0
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 0x403453
mov eax, dword [edi]
push 1
cdq
push 0
push edx
push eax
mov dword [esi + 0x18], 0xffffffff
call fcn.00412720
mov ecx, dword [esi + 0x1ae8]
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 0x402abf
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.00412b60
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 0x402ae3
fmul qword [0x4277b8]
jmp 0x402ae9
fmul qword [0x4277b0]
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.00412d6d
mov edi, dword [0x42f9e4]
push 0x4274ac
push str.Debug.txt
call fcn.0041269d
lea edx, [esp + 0x29c]
push edx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov eax, dword [edi]
push eax
call fcn.00412592
mov eax, dword [esi + 0x38]
add esp, 0x28
cmp eax, 6
jne 0x403432
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 [0x42f9e4]
add esp, 0x20
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebp, [edi + 0x204]
call fcn.004126b0
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.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebp
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov edx, dword [edi]
push edx
call fcn.00412592
mov eax, dword [esp + 0x68]
add esp, 0x1c
xor edi, edi
push edi
push 0x100
push eax
push ebx
call fcn.00412b60
mov ecx, dword [esi + 0x18]
add eax, 0xfffffffe
mov dword [esi + 0x2308], 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 0x402c4a
push eax
mov ecx, esi
call fcn.004012b0
mov ecx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], ecx
mov edx, dword [esi + 0x1b04]
and edi, 0x7ffffff
mov edi, dword [edx + edi*2]
cmp edi, 0xffffffff
mov dword [esp + 0x30], edi
jne 0x402c6c
push 0xe1
jmp 0x402a4e
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 0x402c9c
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], edx
test edi, edi
jne 0x402cbc
mov eax, dword [esi + 0x1b04]
and ebp, 0x7ffffff
cmp dword [eax + ebp*2], 0xffffffff
je 0x402cbc
mov ebx, dword [esp + 0x10]
inc ebx
jmp 0x402e26
cmp ebx, 0x10
jbe 0x402d72
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 0x402d00
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], edx
mov eax, dword [esi + 0x1b04]
and edi, 0x7ffffff
mov edi, dword [eax + edi*2]
cmp edi, 0xffffffff
je 0x402d53
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 0x402d42
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], edx
mov eax, dword [esi + 0x1b04]
and ebp, 0x7ffffff
cmp edi, dword [eax + ebp*2]
jae 0x402d59
mov dword [esp + 0x10], ebx
jmp 0x402d61
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 0x402cd0
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 0x402da3
push eax
mov ecx, esi
call fcn.004012b0
mov edx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], edx
mov eax, dword [esi + 0x1b04]
and edi, 0x7ffffff
mov ecx, dword [eax + edi*2]
cmp ebx, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
ja 0x402e1e
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 0x402dec
push eax
mov ecx, esi
call fcn.004012b0
mov ecx, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], ecx
mov ecx, dword [esp + 0x1c]
mov edx, dword [esi + 0x1b04]
and edi, 0x7ffffff
mov edi, dword [edx + edi*2]
mov edx, dword [esi + 0x2308]
mov eax, edi
sub eax, ecx
shr edx, 1
cmp eax, edx
ja 0x402e1e
cmp edi, ecx
jb 0x402e1e
mov eax, dword [esp + 0x10]
inc ebx
add ebp, 0x80
cmp ebx, eax
jbe 0x402dc1
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x402e94
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.00412b60
cmp eax, dword [esi + 0x18]
je 0x402e6f
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], eax
push 0
push 0x8000000
push edi
push ebp
call fcn.00412aa0
mov ecx, dword [esi + 0x1b04]
mov ebp, dword [ecx + eax*2]
inc ebp
mov dword [esp + 0x18], 0
jmp 0x402f56
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 0x402ec1
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], eax
mov ecx, dword [esi + 0x1b04]
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 0x402efc
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], eax
mov ecx, dword [esi + 0x1b04]
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 0x402f2b
fadd qword [0x4276d8]
fdiv dword [esi + 0x1b00]
fmul qword [0x4274c0]
call fcn.00412e7c
sub ebp, edi
mov dword [esp + 0x18], ebx
mov ebx, dword [esi + 0x2308]
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 0x402fbc
mov edi, dword [esp + 0x18]
xor ecx, ecx
jmp 0x402fa0
xor edx, edx
lea eax, [ecx + edi]
div dword [esi + 0x2308]
mov eax, dword [esi + 8]
inc ecx
cmp ecx, ebx
mov dword [eax + ecx*4 - 4], edx
jbe 0x402fa0
jmp 0x4030fa
mov eax, dword [esi]
mov ecx, dword [0x42f968]
push eax
push 0x4052d0
push eax
push str.PERSENT
push ecx
call dword [sym.imp.USER32.dll_CreateDialogParamW]
push 0xde
mov dword [esi + 4], eax
call fcn.004060c0
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 0x4030e0
test ebx, ebx
mov dword [esp + 0x48], ebx
fild dword [esp + 0x48]
jge 0x40301b
fadd qword [0x4276d8]
fstp qword [esp + 0x50]
nop
mov eax, dword [esp + 0x10]
fild dword [esp + 0x10]
test eax, eax
jge 0x403032
fadd qword [0x4276d8]
fdiv qword [esp + 0x50]
fmul qword [0x4276c0]
call fcn.00412e7c
mov edi, eax
cmp edi, dword [esp + 0x34]
je 0x403072
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 + 0x2308]
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 0x4030b0
push eax
mov ecx, esi
call fcn.004012b0
mov eax, dword [esi + 0x1af0]
mov dword [esi + 0x1b04], eax
mov ecx, dword [esi + 0x1b04]
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 0x403020
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 + 0x2308]
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 [0x42f9e4]
add esp, 0x10
push 0
lea eax, [esp + 0x88]
push 0
push eax
lea ebx, [edi + 0x204]
call fcn.004126b0
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.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov eax, dword [edi]
push eax
call fcn.00412592
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 [0x42f9e4]
add esp, 0x2c
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.004126b0
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.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov edx, dword [edi]
push edx
call fcn.00412592
mov eax, dword [esp + 0x4c]
add esp, 0x1c
test eax, eax
jne 0x403233
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 0x403246
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 [0x42f9e4]
add esp, 0x10
push 0
lea edx, [esp + 0x88]
push 0
push edx
lea ebx, [edi + 0x204]
call fcn.004126b0
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.004126b0
push 0x4274ac
push str.Debug.txt
mov byte [eax + edi + 0x204], 0
call fcn.0041269d
push ebx
push 0x42749c
push eax
mov dword [edi], eax
call fcn.004125e3
mov edx, dword [edi]
push edx
call fcn.00412592
mov eax, ebp
mov ecx, 0x100
mul ecx
mov ebx, edx
mov edx, dword [esi + 8]
mov edi, eax
mov dword [esi + 0x230c], ebp
mov eax, dword [edx]
add esp, 0x1c
test eax, eax
je 0x4032ed
mov ecx, dword [esi + 0x2c]
imul eax, eax, 0x7c
xor edx, edx
div ecx
sub ecx, edx
jmp 0x4032ef
xor ecx, ecx
cmp ecx, dword [esi + 0x2c]
mov dword [esi + 0x2310], ecx
jne 0x403304
mov dword [esi + 0x2310], 0
push 0
push 2
push ebx
push edi
call fcn.00412b60
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.00412aa0
push 0
push 0x80
push ebp
push edi
mov ebx, eax
call fcn.00412b60
mov ecx, 0x7c
mul ecx
cmp ebx, 4
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], edx
jbe 0x40335b
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 + 0x1af4]
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 + 0x1af8]
push 1
push 0
push 0
push ecx
call fcn.00412720
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.00412720
add ebp, eax
adc edi, edx
mov edx, edi
sar edx, 0x1f
mov dword [esi + 0x1af8], 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.00412b60
mov dword [esi + 0x40], eax
mov eax, 1
mov dword [esi + 0x44], edx
mov dword [esi + 0x10], eax
mov ecx, dword [esp + 0x430]
pop ebx
pop ebp
pop edi
pop esi
call fcn.00412538
add esp, 0x424
ret 4