Function at 0x474228
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc94
cmp dword [ebp + 0x18], 3
je 0x47424d
cmp dword [ebp + 0x18], 2
je 0x47424d
cmp dword [ebp + 0x18], 1
je 0x47424d
mov eax, 0x10000
jmp 0x4746be
cmp dword [ebp + 0x18], 3
jne 0x474358
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
je 0x4742ec
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0xffffffff
je 0x47427a
mov edx, dword [ebp + 8]
push dword [edx]
call fcn.00473744
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], 0xffffffff
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [edx + 4]
cmp ecx, dword [ebp + 0xc]
jg 0x47429b
mov eax, 0x10000
jmp 0x4746be
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov eax, dword [ecx + 0x10]
cmp eax, dword [ebp + 0xc]
jle 0x4742c0
mov edx, dword [ebp + 8]
push dword [edx]
call fcn.00472cdc
pop ecx
jmp 0x4742c0
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00472d48
pop ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [edx + 0x10]
cmp ecx, dword [ebp + 0xc]
jl 0x4742b5
mov eax, dword [ebp + 8]
push dword [eax + 0x138]
mov edx, dword [ebp + 8]
push dword [edx]
call fcn.00473124
add esp, 8
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [eax + 4], ecx
lea edx, [ebp - 1]
push edx
push dword [ebp + 0x14]
push dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00473390
add esp, 0x10
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x474321
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00473744
pop ecx
mov edx, dword [ebp + 8]
mov dword [edx + 4], 0xffffffff
cmp byte [ebp - 1], 0
je 0x47432e
xor eax, eax
jmp 0x4746be
cmp dword [ebp - 8], 0
jle 0x47433e
mov eax, 0x600
jmp 0x4746be
cmp dword [ebp - 8], 0xffffff96
jne 0x47434e
mov eax, 0x1000
jmp 0x4746be
mov eax, 0x5000000
jmp 0x4746be
mov edx, dword [ebp + 8]
cmp dword [edx + 4], 0xffffffff
je 0x47436c
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00473744
pop ecx
mov eax, dword [ebp + 8]
mov dword [eax + 4], 0xffffffff
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov eax, dword [ecx + 4]
cmp eax, dword [ebp + 0xc]
jg 0x47438d
mov eax, 0x10000
jmp 0x4746be
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov eax, dword [ecx + 0x10]
cmp eax, dword [ebp + 0xc]
jle 0x4743b2
mov edx, dword [ebp + 8]
push dword [edx]
call fcn.00472cdc
pop ecx
jmp 0x4743b2
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00472d48
pop ecx
mov eax, dword [ebp + 8]
mov edx, dword [eax]
mov ecx, dword [edx + 0x10]
cmp ecx, dword [ebp + 0xc]
jl 0x4743a7
lea eax, [ebp - 0x164]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004739c8
add esp, 0xc
test byte [ebp - 0x5c], 0x10
je 0x474454
cmp dword [ebp + 0x18], 1
jne 0x4743e7
xor eax, eax
jmp 0x4746be
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 0xc]
movsx eax, byte [ecx]
cmp eax, 0x2f
je 0x47441b
mov edx, dword [ebp - 0xc]
movsx ecx, byte [edx]
cmp ecx, 0x5c
je 0x47441b
mov eax, dword [ebp - 0xc]
cmp byte [eax], 0
je 0x474417
mov edx, dword [ebp - 0xc]
movsx ecx, byte [edx + 1]
cmp ecx, 0x3a
je 0x47441b
xor eax, eax
jmp 0x474420
mov eax, 1
mov byte [ebp - 0xd], al
cmp byte [ebp - 0xd], 0
je 0x474438
push dword [ebp - 0xc]
push 0
call fcn.00474120
add esp, 8
jmp 0x47444d
push dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, 0x140
push edx
call fcn.00474120
add esp, 8
xor eax, eax
jmp 0x4746be
cmp dword [ebp + 0x18], 1
jne 0x474465
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x14], edx
jmp 0x4745a2
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
jmp 0x474499
mov ecx, dword [ebp - 0x20]
movsx eax, byte [ecx]
cmp eax, 0x2f
je 0x47448f
mov edx, dword [ebp - 0x20]
movsx ecx, byte [edx]
cmp ecx, 0x5c
jne 0x474496
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x1c], eax
inc dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
cmp byte [edx], 0
jne 0x474479
push dword [ebp - 0x18]
lea ecx, [ebp - 0x268]
push ecx
call sub.CC3260MT.DLL__strcpy
add esp, 8
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jne 0x4744c4
mov byte [ebp - 0x268], 0
jmp 0x4744d2
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x18]
mov byte [ebp + edx - 0x268], 0
movsx ecx, byte [ebp - 0x268]
cmp ecx, 0x2f
je 0x474503
movsx eax, byte [ebp - 0x268]
cmp eax, 0x5c
je 0x474503
cmp byte [ebp - 0x268], 0
je 0x4744ff
movsx edx, byte [ebp - 0x267]
cmp edx, 0x3a
je 0x474503
xor ecx, ecx
jmp 0x474508
mov ecx, 1
mov byte [ebp - 0x21], cl
cmp byte [ebp - 0x21], 0
je 0x474542
push dword [ebp - 0x1c]
lea eax, [ebp - 0x268]
push eax
push 0x5cb64d
lea edx, [ebp - 0x36c]
push edx
call sub.user32.dll_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0x268]
push ecx
push 0
call fcn.00474120
add esp, 8
jmp 0x474583
push dword [ebp - 0x1c]
lea eax, [ebp - 0x268]
push eax
mov edx, dword [ebp + 8]
add edx, 0x140
push edx
push 0x5cb652
lea ecx, [ebp - 0x36c]
push ecx
call sub.user32.dll_wsprintfA
add esp, 0x14
lea eax, [ebp - 0x268]
push eax
mov edx, dword [ebp + 8]
add edx, 0x140
push edx
call fcn.00474120
add esp, 8
push 0
push dword [ebp - 0x5c]
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x36c]
push ecx
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4745b2
mov eax, 0x200
jmp 0x4746be
mov edx, dword [ebp + 8]
push dword [edx + 0x138]
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00473124
add esp, 8
mov eax, dword [ebp + 8]
cmp dword [eax + 0x13c], 0
jne 0x4745e8
push 0x4000
call sub.CC3260MT.DLL___bnwa_qui
pop ecx
mov edx, dword [ebp + 8]
mov dword [edx + 0x13c], eax
xor ecx, ecx
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x29]
push eax
push 0x4000
mov edx, dword [ebp + 8]
push dword [edx + 0x13c]
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00473390
add esp, 0x10
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffff96
jne 0x47461e
mov dword [ebp - 0x28], 0x1000
jmp 0x47467e
cmp dword [ebp - 0x30], 0
jge 0x47462d
mov dword [ebp - 0x28], 0x5000000
jmp 0x47467e
cmp dword [ebp - 0x30], 0
jle 0x47465f
push 0
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x30]
mov edx, dword [ebp + 8]
push dword [edx + 0x13c]
push dword [ebp - 0x14]
call sub.kernel32.dll_WriteFile
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jne 0x47465f
mov dword [ebp - 0x28], 0x400
jmp 0x47467e
cmp byte [ebp - 0x29], 0
jne 0x47467e
cmp dword [ebp - 0x30], 0
jne 0x474674
mov dword [ebp - 0x28], 0x5000000
jmp 0x47467e
cmp dword [ebp - 0x28], 0
je 0x4745ed
cmp dword [ebp - 0x28], 0
jne 0x474698
lea ecx, [ebp - 0x48]
push ecx
lea eax, [ebp - 0x58]
push eax
lea edx, [ebp - 0x50]
push edx
push dword [ebp - 0x14]
call sub.kernel32.dll_SetFileTime
cmp dword [ebp + 0x18], 1
je 0x4746a6
push dword [ebp - 0x14]
call sub.kernel32.dll_CloseHandle
mov ecx, dword [ebp + 8]
push dword [ecx]
call fcn.00473744
pop ecx
cmp dword [ebp - 0x28], 0
je 0x4746bc
mov eax, dword [ebp - 0x28]
jmp 0x4746be
xor eax, eax
mov esp, ebp
pop ebp
ret