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

Disassembly:
sub esp, 0x450
push ebx
push ebp
push esi
push edi
mov ebp, ecx
call fcn.004029d0
mov ebx, dword [esp + 0x464]
mov ecx, ebp
push ebx
call fcn.00403fd0
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x7f
xor eax, eax
lea edi, [esp + 0x4d]
mov byte [esp + 0x4c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x41a460
push ebx
stosb byte es:[edi], al
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
test esi, esi
mov dword [esp + 0x14], esi
jne 0x4021dc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push str.CExtractManager::ExtractSom:_fopen_error__s___d_
push 0x41a040
call fcn.0040c930
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 4
push 2
push 0xffffffffffffffe8
push esi
mov dword [esp + 0x1c], 0
call dword [sym.imp.MSVCRT.dll_fseek]
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea eax, [esp + 0x40]
push 0x10
push eax
call ebx
push esi
push 1
lea ecx, [esp + 0x34]
push 4
push ecx
call ebx
push esi
push 1
lea edx, [esp + 0x58]
push 4
push edx
call ebx
add esp, 0x3c
mov ecx, 4
mov edi, str.SOMDOCUMENT12345
lea esi, [esp + 0x2c]
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
je 0x40225f
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push str.CExtractManager::ExtractSom:_id_error
push 0x41a040
call fcn.0040c930
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 4
mov esi, dword [esp + 0x14]
mov edi, dword [sym.imp.MSVCRT.dll_ftell]
push esi
call edi
mov ecx, dword [esp + 0x28]
add esp, 4
cmp ecx, eax
jb 0x4022ab
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
push esi
call edi
mov edx, dword [esp + 0x2c]
add esp, 8
push eax
push edx
push str.CExtractManager::ExtractSom:_len_error__x____x
push 0x41a040
call fcn.0040c930
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 4
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
mov eax, 0xfffffe70
sub eax, ecx
push 2
push eax
push esi
call edi
push esi
push 1
lea ecx, [esp + 0x60]
push 0x190
push ecx
call ebx
mov edx, dword [esp + 0x40]
push 2
neg edx
push edx
push esi
call edi
mov eax, dword [ebp + 0x21c]
mov edi, dword [esp + 0x38]
lea esi, [ebp + 0x218]
add esp, 0x28
test eax, eax
jne 0x4022f4
xor edx, edx
jmp 0x40230c
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0xf6603d99
imul ecx
add edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, dword [esp + 0x10]
jae 0x402339
mov ecx, dword [esi + 8]
lea edx, [esp + 0x24c]
mov dword [esp + 0x20], ecx
push edx
mov ecx, esi
call fcn.00404220
sub edi, eax
mov eax, dword [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.00404260
jmp 0x402360
mov ecx, esi
call fcn.00404220
cmp edi, eax
jae 0x402360
mov ecx, dword [esi + 8]
mov edx, edi
shl edx, 5
add edx, edi
push ecx
mov ecx, dword [esi + 4]
lea eax, [edi + edx*4]
lea edx, [ecx + eax*4]
mov ecx, esi
push edx
call fcn.004045a0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 0x21c]
push ecx
push edx
push 0x214
push eax
call ebx
mov ecx, dword [esp + 0x20]
add esp, 0x10
cmp ecx, eax
je 0x4023d1
push str.CExtractManager::ExtractSom:_nFileCount_error
push 0x41a040
call fcn.0040c930
mov ecx, dword [esi + 4]
mov eax, dword [esi + 8]
push ecx
push eax
push eax
call fcn.00404600
add esp, 0x14
mov edi, eax
mov eax, dword [esi + 8]
mov ecx, esi
push eax
push edi
call fcn.004045f0
mov ecx, dword [esp + 0x14]
mov dword [esi + 8], edi
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 4
mov edx, dword [0x423b74]
mov eax, dword [0x423b78]
push eax
xor esi, esi
lea edi, [edx + 1]
push str.CExtractManager::ExtractSom:_DSInst_Product__d_
push 0x41a040
mov dword [esp + 0x24], edi
mov dword [esp + 0x34], esi
call fcn.0040c930
mov ecx, dword [ebp + 0x1408]
add esp, 0xc
push ecx
push str.CExtractManager::ExtractSom:_SomType__d_
push 0x41a040
call fcn.0040c930
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, esi
jle 0x4028c9
mov ebx, 1
mov dword [esp + 0x20], ebx
mov edx, dword [ebp + 0x21c]
mov ecx, dword [esi + edx + 0x210]
lea eax, [esi + edx]
push ecx
mov edx, dword [eax + 0x208]
push edx
push ebx
push str.CExtractManager::ExtractSom__d_:_Enc__d__Lang__d_
push 0x41a040
call fcn.0040c930
mov eax, dword [ebp + 0x21c]
add esp, 0x14
mov ecx, dword [esi + eax + 0x20c]
test ecx, ecx
je 0x402877
mov ecx, dword [ebp + 0x1408]
test ecx, ecx
je 0x4024a4
cmp ecx, 2
je 0x4024a4
cmp dword [0x423b78], 1
jle 0x4025aa
mov eax, dword [esi + eax + 0x208]
cmp eax, 7
je 0x402877
cmp eax, 8
jne 0x4025aa
jmp 0x402877
cmp dword [0x423b78], 1
jle 0x4024bf
add eax, esi
mov ecx, ebp
push eax
call fcn.00403f80
test al, al
je 0x402877
cmp dword [0x423b78], 1
jne 0x402581
mov eax, dword [ebp + 0x21c]
lea ecx, [esi + eax]
mov eax, dword [esi + eax + 0x208]
cmp eax, 2
je 0x402581
cmp eax, 1
je 0x402581
mov eax, dword [ecx + 0x210]
test eax, eax
je 0x40255b
cmp edi, eax
je 0x402516
push eax
push ecx
push ebx
push str.CExtractManager::ExtractSom:_Skip_____d___s__Useless_LanguageRes__d_
push 0x41a040
call fcn.0040c930
add esp, 0x14
jmp 0x402877
cmp eax, 5
jl 0x40255b
push eax
push ecx
push str.CExtractManager::ExtractSom:_11_Lang___s____d_
push 0x41a040
call fcn.0040c930
mov ecx, dword [ebp + 0x21c]
add esp, 0x10
cmp dword [esi + ecx + 0x20c], 5
jne 0x40255b
push 1
push str.CExtractManager::ExtractSom:_11_LangSds___d_
push 0x41a040
mov dword [esp + 0x34], 1
call fcn.0040c930
add esp, 0xc
mov edi, dword [ebp + 0x21c]
lea edx, [ebx - 1]
push edx
mov ecx, ebp
call fcn.00403560
push eax
mov eax, dword [edi + esi + 0x208]
push eax
mov ecx, ebp
call fcn.00403730
jmp 0x402873
cmp dword [ebp + 0x1408], 2
jne 0x4025aa
mov ecx, dword [ebp + 0x21c]
mov eax, dword [esi + ecx + 0x208]
cmp eax, 7
je 0x4025aa
cmp eax, 8
je 0x4025aa
cmp eax, 9
jne 0x402877
mov edx, dword [ebp + 0x21c]
cmp dword [esi + edx + 0x208], 0xd
jne 0x4025da
call fcn.0040cc90
test eax, eax
jne 0x4025da
push str.CExtractManager::ExtractSom_MT_X64MODULE_Not_Skip___
push 0x41a040
call fcn.0040c930
add esp, 8
jmp 0x402877
mov eax, dword [ebp + 0x21c]
lea ecx, [esi + eax]
mov eax, dword [esi + eax + 0x210]
test eax, eax
je 0x402672
cmp edi, 5
jl 0x4026c9
cmp eax, 3
jne 0x4026c9
push ebx
push eax
push ecx
push str.CExtractManager::ExtractSom:_22_LangEng___s____d__no._d
push 0x41a040
call fcn.0040c930
add esp, 0x14
mov ecx, dword [ebp + 0x21c]
add ecx, esi
mov eax, dword [ecx + 0x210]
cmp edi, eax
jne 0x402672
cmp eax, 5
jl 0x402672
push ebx
push eax
push ecx
push str.CExtractManager::ExtractSom:_22_Lang___s____d__no._d
push 0x41a040
call fcn.0040c930
mov edx, dword [ebp + 0x21c]
add esp, 0x14
cmp dword [esi + edx + 0x20c], 5
jne 0x402672
push ebx
push 1
push str.CExtractManager::ExtractSom:_22_LangSds___d__no._d
push 0x41a040
mov dword [esp + 0x38], 1
call fcn.0040c930
add esp, 0x10
lea eax, [ebx - 1]
mov ecx, ebp
push eax
call fcn.00403560
mov ecx, dword [ebp + 0x21c]
cmp dword [esi + ecx + 0x208], 1
jne 0x4026ec
mov eax, dword [ebp + 0x1408]
cmp eax, 1
je 0x40269d
cmp eax, 2
jne 0x4026ec
lea edx, [ebp + 0x11f0]
lea edi, [ebp + 8]
push edx
push edi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 8
push edi
push str.CExtractManager::ExtractSom:_Its_OLE_DOC_or_SimpleSom__s_
push 0x41a040
call fcn.0040c930
add esp, 0xc
jmp 0x402873
cmp edi, eax
je 0x402619
push ebx
push eax
push edi
push ecx
push str.CExtractManager::ExtractSom:_22___s__nLcId___d______d__no._d
push 0x41a040
call fcn.0040c930
add esp, 0x18
jmp 0x402877
lea edi, [ebp + 0x11f0]
push 0x41a458
push edi
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
push eax
push ebx
push str.CExtractManager::ExtractSom:_Current__d____FileCount__d_
push 0x41a040
call fcn.0040c930
mov eax, dword [esp + 0x2c]
add esp, 0x10
test eax, eax
jne 0x402752
push str.CExtractManager::ExtractSom:_TarFp_NULL__Skip_FileName
push 0x41a040
call fcn.0040c930
mov ecx, dword [ebp + 0x21c]
add esp, 8
mov edx, dword [esi + ecx + 0x208]
push edi
push edx
mov ecx, ebp
call fcn.00403730
jmp 0x402873
mov eax, dword [ebp + 0x21c]
mov edx, dword [esp + 0x14]
push 0
mov ecx, dword [esi + eax + 0x200]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [ebp + 0x21c]
add esp, 0xc
mov ecx, dword [esi + eax + 0x200]
push ecx
push str.CExtractManager::ExtractSom:_nStart___d_
push 0x41a040
call fcn.0040c930
mov eax, dword [ebp + 0x21c]
add esp, 0xc
cmp dword [esi + eax + 0x208], 1
je 0x402893
mov edx, dword [eax + esi + 0x204]
inc edx
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
mov eax, dword [ebp + 0x21c]
mov edi, ebx
mov ecx, dword [esi + eax + 0x204]
xor eax, eax
inc ecx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0x21c]
mov ecx, dword [esp + 0x18]
push ecx
mov edx, dword [eax + esi + 0x204]
push edx
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
mov edi, eax
mov eax, dword [esp + 0x30]
push eax
push edi
push 1
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebp + 0x21c]
add esp, 0x24
mov edx, dword [esi + ecx + 0x204]
push eax
push edi
push edx
push str.CExtractManager::ExtractSom:_SIZE__d__READ__d__WRITE__d_
push 0x41a040
call fcn.0040c930
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x18
test ebx, ebx
je 0x402840
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [ebp + 0x21c]
lea edi, [ebp + 0x11f0]
push edi
mov edx, dword [esi + ecx + 0x208]
mov ecx, ebp
push edx
call fcn.00403730
push edi
push str.CExtractManager::ExtractSom:_Extract___s_
push 0x41a040
call fcn.0040c930
mov ebx, dword [esp + 0x2c]
add esp, 0xc
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
inc ebx
add esi, 0x214
mov dword [esp + 0x20], ebx
lea eax, [ebx - 1]
cmp eax, ecx
jl 0x40242a
jmp 0x4028c9
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
lea edx, [ebp + 0x11f0]
lea esi, [ebp + 8]
push edx
push esi
call dword [sym.imp.MSVCRT.dll_wcscpy]
add esp, 0xc
push esi
push str.CExtractManager::ExtractSom:_ExtractDoc__DUE_TO___s
push 0x41a040
call fcn.0040c930
mov edi, dword [esp + 0x24]
add esp, 0xc
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x2c]
mov esi, 1
add esp, 4
cmp eax, esi
jne 0x402959
push str.CExtractManager::ExtractSom:_TRUE__bLangSds
push 0x41a040
call fcn.0040c930
add esp, 8
cmp dword [ebp + 0x140c], esi
jne 0x40291a
mov eax, dword [ebp + 0x1474]
test eax, eax
jne 0x40290d
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
push eax
call fcn.0040d360
mov ecx, eax
call fcn.0040d3f0
push str.CExtractManager::ExtractSom:_GetSecuAcl__
push 0x41a040
call fcn.0040c930
add esp, 8
lea ecx, [esp + 0x4c]
push ecx
mov ecx, ebp
call fcn.00402b90
push str.CExtractManager::ExtractSom:_Extract__Success_
push 0x41a040
call fcn.0040c930
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x450
ret 4
push 0xc
mov ecx, 0x425008
call fcn.004054c0
push eax
push edi
push str.CExtractManager::ExtractSom:_FALSE__bLangSds_nLcId:__d__OLE:__d_
push 0x41a040
call fcn.0040c930
add esp, 0x10
cmp edi, 5
jl 0x4028f6
mov eax, dword [ebp + 0x1408]
test eax, eax
jne 0x4028f6
push str.CExtractManager::ExtractSom:_FAIL..
push 0x41a040
call fcn.0040c930
add esp, 8
push 0x10
push 0x41ab60
push str.Unable_to_open_this_document_in_this_system
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x450
ret 4